![]() |
AVR-Microcontroller |
|
|
The APRS Telemetry Interface Die SoftwareEditing the ProgramNormally there should be no need to edit the program files. The files "aprs_int.hex" and "aprs_int.eep" are ready to use. The software system only has files in pure ASCII. I use "kedit" on Linux/KDE for editing. On Windows there is a little problem with the assembler system
"avrasm.exe" of Atmel. The editor
can use only short textfiles, my version from 1998 did so. I hope they have
fixed it now. In this case you will have to split the source files into
smaller parts and put it together with the ".include"-command while
assembling. The project has a main file "aprs_int.asm". The other files are added at assembling time by the ".include"-command. Some files are parts of the program, split off the main file to keep it shorter, "*.asm", others are library files which I use in other projects too, "*.inc". Assembling the ProgramTwo files, "aprs_int.hex" and "aprs_int.eep" in Intel HEX-Format have to be loaded into the flash-memory and the EEPROM of the controller. If your programmer software needs another format, you have to assemble the source yourself. On my Linux-mashine I use the assembler tavrasm by Tom Mortensen. It is available in a DOS-version too. You should be able to assemble the source with the original assembler of Atmel as well. Installation of the assembler tavrasm on Linux or DOS is easy after download from the internet. Command line for assembling: tavrasm -h aprs_int.asm -o aprs_int.hex -r aprs_int.eep -e aprs_int.lst This means: start the assembler "tavrasm" with parameters -h for the correct HEX-fileformat (depending on the programming software), input file, -o .hex file, -r .eep file, -e .lst file. You can omit the last parameter, if you do not need the .lst file. Programming the ControllerThere are different ways of programming the controller. STK200/STK300If you have a STK200- or STK300-board, you are lucky. The connector "ATMELPGM" on the interface board is designed for this system. You will have the programming software and you can start working. May be the programming software will swap the bytes on odd and even addresses in the EEPROM, my software of 1998 did so. Please check it with the "RM"-command. If the interface answers with a line like "Channel Matrix: DN0=?255 DN1=?255...", the bytes are swapped. In this case you can define the channel matrix by hand using the "MM"-command. The times of the watchdogs are swapped too, set it by hand. The other places in the EEPROM are not affected by swapping the bytes. If you do not want this trouble, then use the "sp12" software. Other AVR-programming systemsIf you have another programming system, you will not have any problems. If you have another connector for programming, you can write the controller on your programmer board and insert it into the interface after work. You will have the appropriate software. Check the bytes in the EEPROM with the "RM"command, see STK200-section. I do not have an AVR-programmerYou can set up your programmer for a few money and some work. Sp12 is a good software for programming the controller with this hardware. It is available for Linux and DOS. Installation is easy, following the documentation. You do not have to set the environment variable for this simple application. After you have started the program the first time, you will find a textfile called "_sp12rc" in your working directory. You should change the line "KANDA=0" to "KANDA=1". Check the line "PORT=xxx" for the correct port address of the printer port you are using and change it if nessessary. You find a little help in this file. Commandline: sp12 -wpCf aprs_int.hex -weCf aprs_int.eep
|