The Atmega32 Programmer.

In the wake of this final year project presentation on 22nd January, we sort of started things up with the project. The first thing was the brain of our sensor nodes - the micro-controller - which needed to be get done with. We chose Atmel’s Atmega32 uC for following “good” reasons:

1. Atmega32 puts up a lot of features right on the uC itself. Things like ADC, Internal Oscillator (1 MHz), 32 KB flash memory etc. are built on the chip and thus saving a considerable amount of effort integrating components and it is available for Rs. 200/- from Sigma Electronics in Saddar, Karachi.

2. It works on the AVR architecture. That is to say, it gives 1 MIPS on 1 MHz clock and correspondingly 16 MIPS on 16 MHz clock. While the 89C52 gives 1 MIPS for 4 MHz.

3. The programming help is available in abundance. There is also a popular C-syntax version of programming tools (Open Source: GCC) which saves from getting in detailed assembly coding.

4. Programmers are easily available and can be built by yourself using PC’s parallel port and a software called PonyProg. The schematic is provided below. We have successfully implemented a programmer today and it DOES work finally. :-)

avr-isp.gif

We found them quite interesting for our application of traffic monitoring using Wireless Sensor Networks. If anyone finds them to be interesting enough to be used just drop me an email at gopchandani@gmail.com

16 Responses to “The Atmega32 Programmer.”

  1. lubz Says:

    hmm…an intresting read however i wouldnt mind if u give brief overview of AVR architecture for layman like me….glad to see ur back on the blog

  2. mohsin Says:

    salamz..interesting project ia m doing something simmilar for my final yer project..wireless sensor node for paddy fields….could u guide me in this programmer for some reason its nt working for me…..thanxs

  3. Rakesh Says:

    @Mohsin: Please be more precise on what is not working. Here’s a piece of advice, whenever you ask for help relating to HARDWARE projects, always be very to-the-point about what was it which you found not to be working so that the person whom you are asking for help can reply you quickly and with his full understanding.

  4. mohsin Says:

    i am using atmega 16 l when i connect to the pony prog the probe test is working fiine but when i try to read or write flash it says device missing or unknown device and am using 330 ohms resistors in the programmer instead of 220 ohms….any help would be appreciated?…thanxs…

  5. Rakesh Says:

    Probe test basically tests using the loop-back connections: 2-12, 3:11, nothing more nothing less.

    330 Ohms is not too high from 220 Ohms to cause this problem. I think the problem may very well be due to dry-soldering or problem of connectivity. Have you checked end-to-end connectivity of parallel port connections? End-to-end meaning from the MCU to the other end of the cable which you are using in the PC.

    Another problem could be improper/wrong connections. I know it sounds a little dumb, but we were constantly doing this mistake when we did it. So check out where you are connecting what AND if that is REALLY connected as you are assuming.

    There is nothing more to this whole thing except this 4-5 wires. It can be easily made to work.

  6. mohsin Says:

    RAKESH …thanxs a lot its finally working …yeah the breadboards ground line was faulty…:)….

  7. Rakesh Says:

    My pleasure.

  8. Nonnino Says:

    Hello!
    Which adapter should I choose in PonyProg setup to use this programmer? Are there any other settings to change to make it work?

  9. Rakesh Says:

    This particular schematic is for ISP so you need to choose that along with the relevant LPT/Parallel port in your computer. You need to choose your AVR in one of the menus in the PonyProg.

    That’s about it, I believe, rest the PonyProg handles neatly. What is specifically your problem, though?

  10. Nonnino Says:

    PonyProg lets me choose among these:
    AVR ISP API
    AVR ISP I/O
    DT-006 API
    DT-006 I/O
    EASY I2C API
    EASY I2C IO

    Which one is ok? I use Windows XP, so I believe it should be AVR ISP I/O.

    My AVR is an ATmega32, 5V, 16Mhz.

    Thanks very much for your advice. I was about to build a buffered interface, which is more reliable, but in my town I can’t find the needed IC.

  11. Rakesh Says:

    Yes. AVR-ISP I/O it is.

    Yes, a buffered interface would be more reliable, but this one works just nice for a lot of things, unless of course you are planning to really do something jazzy.

    Good Luck, BTW what are you planning to use the AVR for?

  12. Nonnino Says:

    I’m going to build a variant of the MMC2IEC project. I’ll do this while I wait for a friend of mine to get me the parts to build the 1541-III (I already have 4 PCB’s, an LCD screen and a nice programmer for PIC microcontrollers).

  13. Rakesh Says:

    Best of luck. :)

  14. Nonnino Says:

    Thank you! It’s always a challenge for me to do this stuff, because I always have to scavenge the junk for parts and this makes me feel a bit like MacGuyver.

  15. Bushra Says:

    I want to prog atmega32 using pong prog via parallel port. can u plz guide me how to perform this task and the hardware that will be need. i m new in this field. also after programming how to run the program when put on actual circuit board.Thanks

  16. Rakesh Says:

    Well this post was originally written to ‘guide’ you.
    Can you be more specific as to what help you need? What don’t you understand in this post?

Leave a Reply