编辑: f19970615123fa | 2018-08-31 |
2 programming voltage zener Z2 conducts and the Vpp On LED lights. Transistor Q3 switches the supply voltage to the programming socket. A low on the base supplies 5V to the socket and the Vcc On LED lights. The control software for this kit is contained in IC1, a pre- programmed 89C2051. It controls all the functions for reading, verifying and programming of the AVR chips, including the EEPROM, lock and fuse bits Port pins P1.0 to P1.7 are used to transfer data to or from the programming socket. IC2, an 8-bit addressable latch, provides additional outputs and is controlled via port pins P3.2 to P3.6 and P3.7. The in-built serial port on pins P3.0 and P3.1 is used to communicate with the host PC. IC3 converts between TTL and RS232 signal levels. TESTING Before applying power, check that all parts are inserted in the correct position. Make sure the electrolytic capacitors and diodes are the right way around. With no ICs inserted apply power via the DC jack. The VPP LED should come on. Check the following: 1. +5V rail - measure between pins
10 and
20 of IC1 socket. 2. VPP voltage - approximately 12V on pin
1 of SKT1 and pin
9 of SKT2 ( Vpp LED on) 3. VCC voltage - 0V on pin
20 of SKT1 and pin
40 of SKT2. 4. Insert a wire link to pins
6 and
16 of the IC2 socket. The VPP voltage should now be 0V. 5. Move the wire link to pins
7 and 8. The Vcc LED should be on and the voltage on pin
20 of SKT1 and pin
40 of SKT2 should be 5V. If all is well, remove power and insert the ICs. When power is then applied the Vcc LED will turn on for 0.5 sec then turn off. Both LEDs will be off. OPERATION &
USE 1. Connect the programmer to the serial port of a PC or other host using a straight through cable. 2. Start a '
terminal program'
such as Windows Terminal, Windows 95/98 HyperTerminal or DOS Telix, ProComm, Boyan. etc. 3. We use our own term.exe. You may download this from http://kitsrus.com/zip/term.zip The zip file includes a detailed explanation of how to setup and use term.exe under W98. 4. Set the communications parameters to
9600 baud,
8 data bits,
1 stop bit and no parity bit. If you use term.exe enter '
term 9600'
. (Make a desktop icon with '
term.exe 9600'
as the ending in the path.) 5. Apply power. A menu will appear and both LEDs should be off. (If the menu does not appear hit Reset on the K122 PCB, or Esc on the keyboard followed by Reset. Or Enter, followed by Reset.) 6. The programmer is ready for use. NOTE: Do not insert or remove ICs in the programming sockets until the programmer is powered up. Once powered do not insert or remove ICs until both LEDs are off. PROGRAMMING COMMANDS ? Commands may be entered in upper or lower case. ? There is no need to select the chip being programmed. The programmer automatically identifies the device before any programming option is executed. An error message is printed for unknown devices. With term.exe using Kit
122 to program AT1200 the usual keypress sequence is C P alt-S enter R P L The first time we hit alt-S we have to put in the name of the file to be sent to the programmer (eg, '
k129.hex'
) where k129.hex is in the same folder as term.exe.The next time you enter alt-S the entry is remembered. You might like to do V alt-S enter a after the P alt-S the first few times to verify the program is correct. X as the optional final command shows the lock bits LB1 &
LB2 status (
0 for locked;
1 unlocked.) C may be omitted if the IC'
s are new and known to be blank. DESCRIPTION OF COMMANDS P Program memory This will program the currently selected memory (flash or eeprom). You will be prompted to send the file, which must be in Intel HEX format. Use an ASCII or text transfer to send it. Before programming a chip it should be erased. Chips that have been locked cannot be programmed without erasing first. If an error occurs while programming, a message will be printed and the programmer will stop. Stop the file transfer and press the reset switch to continue. V Verify memory Verify the selected memory (flash or eeprom) against an Intel HEX file. You will be prompted to send the file. An error message will be printed if verification fails. Note:Verification should be performed BEFORE writing the lock bits. Writing the lock bits prevents the code from being read out. All data will read as FFh and verification will fail. D Dump memory Read the contents of the selected memory (flash or eeprom) and send it to the PC. The data is converted into Intel HEX format before sending. A terminal DIY KIT 122. ATMEL AVR PROGRAMMER PAGE