The result from google'ing was promising, and there were a few resources that gave a pretty good description of how to building one yourself.
The Hardware
All you need to do is solder wires to the port 2, 11, 1 ,16 and 18 of the parallel port
Parallel Port AVR
2 MOSI
11 MISO
1 SCK
16 RESET
18 GND
Next, you need to fire up the data sheet for your corresponding chip and find out where are the corresponding ports for
the wire. You will need to locate the MOSI, MISO, SCK, REST and GND pins on the chip and connect it up to the appropriate
port on the parallel port
For the ATMEGA88 it looks like this, Port 19,18,17 and 19 is what we are looking forThat is all the hardware you need to program the AVR!
It is also recommended that you hook the VCC and GND chip up to a 5V and 3.3 voltage source,
although some parallel port might have enough power to power up the chip, most larger AVRs will
require external supplies.
Software
WinAvr is a suite that consist of a C compiler for AVR and an AVR programmer called AVRdude.
An interesting file to look at at AVRdude is the configuration file at \winavr\bin\avrdude.conf
I was poking into this file because I keep getting an error, "Parallel Port LPT 1" not found when I was trying to write to the chip.
However the parallel port was in fact it was plugged in and all the connections were secured.
After 2 hours of scratching my head, I finally realized that I have soldered the parallel port wrongly. However
all is not lost, this .conf file above allow you to change the pins of the parallel port to match the programmer that you have created.
Simply do a search for "dapa" and you can to reassign pins on the parallel port to your hearts content.
After doing that, I was able to do a terminal connection to the Microcontroller using the commandavrdude -p ATMEGA88 -t
Now I need to work on understanding how to program an AVR with C
All the parts you need is a
- Male to Male parallel cable
- Female parallel port
- Wires
- Solder
No comments:
Post a Comment