Recent Changes - Search:

ENTER NEW DAILY DATA HERE:

PmWiki

pmwiki.org

edit SideBar

November13-UsingTheChipBurner

We bought the STK500 "starter kit for 8-bit AVR microcontrollers" from Digikey#ATSTK500-ND. (This was a mistake. We should have bought the AVR ISP mkII (ISP = In System Programmer) http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail?name=ATAVRISP2-ND. It's half the price, and is quicker to set up).

It comes with a large printed circuit board (sort of like a gigantic Arduino, but with an RS232 port instead of a USB port, and with lots of sockets for different size ICs), a cd with a copy of AVR Studio (also available from the Atmel website http://www.atmel.com/dyn/products/tools_card.asp?tool_id=2725), and some cables. The user's guide is found in the help menu of AVR Studio, and is called "AVR Tools User Guide". The user's guide is also available here: http://www.atmel.com/dyn/resources/prod_documents/doc1925.pdf

Hardware Connections:

1. Power Supply: 10V to 15V, at least 500mA. The input jack on the board is looking for a plug with a negative center and positive outside.

2. Using the ribbon cable, connect "PROG CTRL" to "PORT D".

3. Using the ribbon cable, connect "PROG DATA" to "PORT B".

4. Orient the board so that the silkscreened word "POWER" is right-side up. Using a jumper cable, connect the right-most pin of "BSEL2" to the pin "PC2" (in PORT C).

5. Place jumpers on each of the top four connections: VTARGET, AREF, RESET, XTAL1. Also place a jumper on OSCSEL to short pin 1 to pin 2 (pin 1 is labeled "1" on the board).

6. Make sure there are no chips inserted into any of the sockets on the board.

7. Connect the 9-pin serial cable to the PC.

Once the above 7 steps are done, you only have to repeat the following step each time you burn the bootloader on an Atmega168.

8. Turn power off (switch is in upper right, next to power jack). Place Atmega168 in socket SCKT 3200A2. Turn power on.

Software:

1. Install AVR Studio. If you have the CD, you can install from that, but make sure you upgrade the software after the installation. If you don't have the CD, just download it here: http://www.atmel.com/dyn/products/tools_card.asp?tool_id=2725 - scroll down to the "Software" section and select the latest version. You will have to "register" with Atmel everytime you download this program.

2. Start a new Assembly project.

3. Click the "AVR" button (connects to the selected AVR Programmer).

4. On the "Main" tab, select Atmega168. Select "PP/HVSP" programming mode.

5. On the "Program" tab, check "Erase device before flash programming" and "Verify device after programming. Select the HEX file to burn (download the Atmega168 bootloader from the Arduino.cc site: http://svn.berlios.de/viewcvs/arduino/trunk/hardware/bootloaders/atmega168/ click on ATmegaBOOT_168_diecimila.hex - right-click to "save target as" and save it somewhere on your computer; your computer will recognize it as a .hex file).

6. On the "Fuses" tab, type new "EXTENDED", "HIGH", and "LOW" HEX values for fuses:

EXTENDED: 0xF8
HIGH: 0xDF
LOW: 0xFF
Then click "Program" -- make sure it actually programs, sometimes one click doesn't do it, then click "Read" to verify that the correct values are loaded.

7. On the "LockBits" tab, type new HEX values for LOCKBIT fuse:

0xCF

Again, click "Program" and "Read".

8. On the "Auto" tab, check off:
Erase Device
Program FLASH
Verify FLASG
Program fuses
Verify fuses
Program lock bits
Verify lock bits

And click "Start."

Once the above 8 steps are done once, all of the settings should stay in memory. All you'll have to do each time you insert a new chip is click the "AVR" button, go to the "Auto" tab, and then click "Start." Make sure to turn the power off (switch in upper right corner, next to power jack), before removing the Atmega168.

Edit - History - Print - Recent Changes - Search
Page last modified on February 17, 2009, at 12:44 PM