Actions

AVR Tutorial: Bootstrapping the AVR: Difference between revisions

From HacDC Wiki

(New page: So you want to program an AVR, but you don't have a programmer? Do you have a parallel port? Then fear not! The AVR chips are set up to flash their program memory through a serial conne...)
 
(Wikified pinout and added link to Secure bootloader)
 
Line 7: Line 7:
For instance, the DAPA (Direct AVR Parallel Access) "programmer" makes the following connections between the parallel port pins and the AVR:
For instance, the DAPA (Direct AVR Parallel Access) "programmer" makes the following connections between the parallel port pins and the AVR:


<pre>
{|
Parallel Pin   AVR
! Parallel Pin
 
! AVR
    1         SCK
|-
    2         MOSI
| 1 || SCK
  11         MISO
|-
  16         RESET
| 2 || MOSI
  20         GND
|-
  21         GND
| 11 || MISO
</pre>
|-
| 16 || RESET
|-
| 20 || GND
|-
| 21 || GND
|}


Connect the wires and test it out!  Type '''avrdude -n -v -p tiny13 -c dapa''' and you should see your part recognized and the fuse settings displayed.  (Make sure to substitute your part name for tiny13.  Type '''avrdude -p help''' to see the list of supported parts.)
Connect the wires and test it out!  Type '''avrdude -n -v -p tiny13 -c dapa''' and you should see your part recognized and the fuse settings displayed.  (Make sure to substitute your part name for tiny13.  Type '''avrdude -p help''' to see the list of supported parts.)


For a much more complicated boot strap technique, there is the [[secure bootloader]] that uses AES encrypted firmware images.




[[Category: AVR Tutorial]]
[[Category: AVR Tutorial]]

Latest revision as of 05:42, 3 January 2009

So you want to program an AVR, but you don't have a programmer? Do you have a parallel port? Then fear not!

The AVR chips are set up to flash their program memory through a serial connection with the host computer, so programming them is mostly a matter of getting the right lines to the chip, with the rest taken care of by the AVRdude software.

The simplest way to get started is with one of the parallel-port "programmers". The basic procedure is to a) look at the docs for AVRdude's various parallel port adapters, b) look at the pinouts for the chip you're using, and c) wire the right pins on the parallel port to the right pins on your AVR.

For instance, the DAPA (Direct AVR Parallel Access) "programmer" makes the following connections between the parallel port pins and the AVR:

Parallel Pin AVR
1 SCK
2 MOSI
11 MISO
16 RESET
20 GND
21 GND

Connect the wires and test it out! Type avrdude -n -v -p tiny13 -c dapa and you should see your part recognized and the fuse settings displayed. (Make sure to substitute your part name for tiny13. Type avrdude -p help to see the list of supported parts.)

For a much more complicated boot strap technique, there is the secure bootloader that uses AES encrypted firmware images.