Here we go: Attaching the "breadboard connections" as well as the
"schematic" for the AVR programmer, which was shown at the
Hackathons. J1 is the jumper to put for programming & remove for
normal uC operation. J2 is the 5 pin jumper connector to be
connected to the Serial Pins of the PC's Serial port. The pin
connections are as per the /etc/avrdude/avrdude.conf (This assumes
that avrdude package is installed properly). Say if you are using
"ponyser" from avrdude.conf, then the DB9 pins would be 8, 7, 5, 4,
3 (currently open), respectively.
You may test, if all these things are fine, just by typing the
following command:
avrdude -p m16 -P /dev/ttyS0 -c ponyser -t.
You may have to change the serial port (/dev/ttyS0) to /dev/ttyUSB0,
if you are using an USB to Serial converter. If everything goes
well, your ATmega16 should get detected with its correct signature
and fuse settings getting displayed, and then providing you a shell
prompt for further operations. Then, you may come out of the shell
by typing Ctrl+D. And for actually burning a program into the
ATmega16, you may follow the steps mentioned below.
Assuming all the above hardware setup is done & verified, you
may directly use the example.c, available as part of the examples
set downloadable from my
website. You
may have to change the F_CPU value to 1000000 (1MHz) in the
Makefile. Then, typing 'make' would compile it into download.hex
(This assumes that you have avr-gcc & avr-libc packages
installed properly). Then, download.hex can be programmed into the
above setup using the following avrdude command (again this assumes
that avrdude package is installed properly):
avrdude -p m16 -P
/dev/ttyS0 -c ponyser -U flash:w:download.hex. You may have to
change the serial port (/dev/ttyS0) to /dev/ttyUSB0, if you are
using an USB to Serial converter. As soon as you remove jumper J1,
after the programming is successfully complete, viola - you should
see the red LED blinking at 1Hz.
Please note while programming if you get the common error showing
incorrect device signature (typically 102), just disconnect both the
J1 & J2 jumper connections, reconnect them, and try again.
Along with, also attached is the BOM & Shopping listing of the
same circuit.
All the attachments have been created & generated using
Fritzing (Enlightened to me by
Sudar)
Best Regards
Anil
Passion: http://profession.sarika-pugs.com
VINAY.V.S said the following on शुक्रवार 15 जुलाई 2011 08:18
अपराह्न:
hi guys,
Can anyone pls post the circuit schematic of the AVR
programmer (the one which was built on the breadboard) which was shown
by Vinay and Anil at the Hackathons??? also, pls do include/ mention,
the steps involved in configuring the software (avrdude, etc..) on the
PC and other related stuff???
thank you and with warm regards,
Vinay.V.S