Anda di halaman 1dari 18

AVR MICROCONTROLLER PROGRAMMER

Thank you for using this AVR Microcontroller programmer. The AVR microcontroller family comprises of 8-bit RISC microcontrollers with speeds up to 20 Mega Instructions per Second (MIPS), surpassing the performance limits of commonly available 8-bit microcontrollers (e.g. AT89x and PIC). The AVRs are a balanced choice for embedded applications and lie at the break even of performance and system cost. This programmer uses a standard COMM Port (Serial Port) and can program numerous variants of the AVR family. The programmer uses ISP method for programming the microcontrollers. A list of all supported devices is given in Table 1. ATMEGA603 ATMEGA103 ATMEGA48 ATMEGA8 ATMEGA8515 ATMEGA8535 ATMEGA88 ATMEGA16 ATMEGA161 ATMEGA162 ATMEGA163 ATMEGA164 ATMEGA168 ATMEGA169 ATTINY13 ATMEGA32 ATTINY15 ATMEGA323 ATTINY22 ATMEGA324 ATTINY2313 ATMEGA64 ATTINY25 ATMEGA640 ATTINY26 ATMEGA644 ATTINY45 ATMEGA128 ATTINY85 ATMEGA1280 ATTINY261 ATMEGA1281 ATTINY461 ATMEGA2560 ATTINY861 ATMEGA2561 AT90S1200 ATTINY12 AT90S2313 Table 1: Complete List of supported devices AT90S2323 AT90S2333 AT90S2343 AT90S4414 AT90S4433 AT90S4434 AT90S8515 AT90C8534 AT90S8535 AT90CAN32 AT90CAN64 AT90CAN128

Table 2 enlists the AVRs that can be programmed using the on-board ZIF sockets. It is worthwhile to note that all the devices in Table 1 can be programmed using the ISP connector provided for the purpose. ATMEGA8515 ATMEGA161 ATMEGA162 ATMEGA16 ATMEGA32 ATMEGA8535 ATMEGA323 ATTINY13 ATTINY85 ATMEGA324 ATTINY15 ATMEGA8 ATMEGA163 ATTINY22 ATMEGA48 ATMEGA164 ATTINY2313 ATMEGA88 ATMEGA644 ATTINY25 ATMEGA168 ATTINY12 ATTINY45 Table 2: List of AVRs programmable through ZIF Sockets

This programmer is a customized adaptation of Pony Prog, and is specifically tailored to program the devices mentioned in Table 2. If desired, the schematics along with the latest software can be downloaded from the Pony Prog website www.lancos.com.

Position of Important Components

ZIF Socket 2 ZIF Socket 1

Connector for PC Serial Port Connector for ISP Cable

Jumper J1

Jumper J2

Jumper J3

Jumper J4

Brief Overview of Jumpers and Connectors This section details relevant information regarding jumpers and connectors on board. It is advised to review this section with utmost care since wrong installation of jumpers, or incorrect combination of ISP signals may render the microcontroller totally useless or locked. Connector for PC Serial Port: The host PC connects to the programmer through this connector. The pinout of the serial port connector is as follows.

1. 2. 3. 4. 5.

Pin 3 Pin 4 Pin 5 Pin 7 Pin 8

Transmit DTR Gnd RTS CTS

Connector for ISP: The ISP connecter provides all signals needed to program AVRs outside the programmer, thus eliminating the need to put the target chip in the programmer. The ZIF sockets are compatible only with AVRs specified in Table 2, thus for greater flexibility and true In-System Programming, these connections may be extracted from the programmer board without zeal. Furthermore, some AVRs, even though they are supported in software, must be programmed outside the programmer using the extracted ISP signals. Examples include AT MEGA 64, AT MEGA 128, AT TINY 26 etc.

1. 2. 3. 4. 5. 6. 7. 8.

Vcc Reset NC SCK MOSI MISO NC Gnd

Jumpers J1, J2, J3 and J4: N.B.: Review the following section with care as incorrect placement of jumpers may destroy the microcontroller. Jumpers J1 through J4 select the type of microcontroller based on its structural resemblance to a particular type. For example, ATMEGA8515, ATMEGA161 and AT MEGA162 have similar pin out therefore they can all be programmed through the same jumper configuration. Below are the programmer diagrams showing how various AVRs can be programmed through their corresponding jumper settings.

Jumper Setting #1:

Figure 1: Jumper Setting #1

In setting #1, jumpers are placed in locations J1 and J2 as shown in Figure 1. Note that the AVRs need to be placed in ZIF #1 to be programmed successfully. Also note the orientation of the AVR in ZIF Socket #1. List of AVRs programmable in this mode is below. 1. ATMEGA8515 2. ATMEGA161 3. ATMEGA162

Jumper Setting #2:

Figure 2: Jumper Setting #2 In setting #2, jumpers are placed in locations J1 and J2 as shown in Figure 2. Note that the AVRs need to be placed in ZIF Socket #1 to be programmed successfully. Also note the orientation of the AVR in ZIF Socket #1. List of AVRs programmed in this mode is below. 1. 2. 3. 4. 5. 6. 7. 8. ATMEGA16 ATMEGA32 ATMEGA323 ATMEGA324 ATMEGA163 ATMEGA164 ATMEGA8535 ATMEGA644

Jumper Setting #3:

Figure 3: Jumper Setting #3 In setting #3, a jumper is placed in location J3 while there is no jumper in any other location as shown in Figure 3. In this mode ATTINY2313 can be programmed through ZIF Socket #2. Also note the orientation of the AVR (AT TINY 2313) in ZIF Socket #2.

Jumper Setting #4:

Figure 4: Jumper Setting #4

In setting #4, no jumper is placed in any location as shown in Figure 4. Note the orientation of the AVR in ZIF Socket #2. List of AVRs programmed in this mode is below. 1. 2. 3. 4. ATMEGA8 ATMEGA48 ATMEGA88 ATMEGA168

Jumper setting #5:

Figure 5: Jumper Setting #5 In setting #5, a jumper is placed in location J4 while there is no jumper in any other location as shown in Figure 5. Note that the AVRs need to be placed in ZIF Socket #2 to be programmed successfully. Also note the orientation of the AVR in ZIF Socket #2. List of AVRs that can be programmed through this mode is below. 1. 2. 3. 4. 5. 6. 7. ATTINY12 ATTINY13 AT TINY15 ATTINY22 ATTINY25 ATTINY45 ATTINY85

The Software The programmer uses Pony Prog to burn hex files into the AVRs. Pony Prog can be installed from the accompanying CD. Latest version of Pony Prog can also be downloaded from www.lancos.com. However, this programmer is tested using Pony Prog software in the accompanying CD. After installing Pony Prog, carry out the following steps to configure Pony Prog with your PC. 1. When you first open the program, you will get a screen similar to the one given in Figure a.

Figure a 2. Next go to interface setup as shown in Figure b and then set the interface to SI Prog IO as shown in Figure c.

Figure b

Figure c 3. Now as the programmer has been set up, the next thing to do is to program and test an AVR microcontroller. We select AT TINY 2313 as a demonstration for getting started. Select AVR micro from the drop down list, as shown in Figure d. Next, select ATTiny2313 from the adjacent drop down list, as shown in Figure e.

Figure d

Figure e

4. Place the ATTiny2313 into ZIF #2, keeping in mind the orientation of the IC as well as the placement of jumper in location J3, as discussed in Figure f (Jumper Setting #3). 5. Erase the AVR, by going to Command menu and clicking Erase, as shown in Figure g. If erased successfully, a message box will appear confirming a successful clear operation as shown in Figure h.

Figure f

Figure g

Figure h 6. We will now program the ATTiny2313. Select a hex file to burn into the AVR, through the steps in Figure i, j, k and l.

Figure i

Figure j

Figure k

Figure l

7. Finally, go to Command and click Program, as shown in Figures m, n and o. A message box will intimate you of a successful write operation.

Figure m

Figure n

Figure o

8. You can save yourself from the hassle of explicitly selecting Erase and Program from the Command menu every time you program an AVR, by following the steps in Figures p and q. Go to Command and click on Program options. Check mark Reload Files, Erase, Write program memory [Flash] and Write Data Memory [EEPROM]. So whenever you want to program the AVR, just press CTRL-P and the AVR will automatically be erased and programmed.

Figure p

Figure q

Important points to note: 1. Prior to changing fuse settings, please review the datasheet thoroughly, of the microcontroller that you are working on, especially the section containing fuse settings. If you set a wrong combination of fuses, the controller may get locked and will only be unlocked using a High Voltage programmer. 2. When you program your controller for the first time, it is running on internal oscillator. If you change its setting to external crystal or resonator then a crystal along with its stabilizing capacitors must also be soldered into the board.

Anda mungkin juga menyukai