Dr. Sajid Muhaimin Choudhury



I'm Dr. Sajid Muhaimin Choudhruy

I am currently working in the Department of Electrical and Electronic Engineering of Bangladesh University of Engineering and Technology, Dhaka-1205. My official website is located at sajid.buet.ac.bd. I previously maintained various personal blogs and websites (sajidmc.net). I decided to move to a permanent web solution to host all my previous blogposts.


[AVR Programmer] Simplification of the LancOs'sSI Prog

(Note: If you are looking for a beginners tutorial, you may proceed to: http://sajiduc.blogspot.com/2008/10/really-beginners-microcontroller-guide.html)
Most beginners of microcontroller programming need a cheap microcontroller programmer to play around. Most universal programmers are quite expensive, so beginners now try to start with S51 from 8051 series, and AVRs which support In-System-Programming (ISP) capability.
To load program in a microcontroller via ISP, various types of programmers have been constructed. The most popular one is perhaps the STK200 variants, one of which can be found in Peter Fleury's website.
But these variants have some limitations. The cable length should be less than 70cm, and some people have claimed that this device damages the parallel port after using it several times.
LancOs has made a program called ponyprog to load programs into the microcontroller using various types of programmers. It supports the STK200, aswell as programming of other devices. STK200 cannot program PIC microcontrollers (to the best of my knowledge) LancOs has designed a programmer that can program all the devices supported by pony prog. This device can program AVR, PIC-12, PIC-16 and various other microcontrollers and eeproms. (To see the full list go to: http://www.lancos.com/prog.html) The schematic of the SI-prog can be obtained from Lancos web site. Their schematic is great, that uses PCs serial ports drained power to program microcontrollers. They also have optional jumpers to feed in external power to the circuit. The schematic is like this: (click to open)

If you take a good look at the schematic, you will find that the circuit is quite complicated. It might be good for professionals (I’m not sure if it is for professionals) but I thought that for beginners the circuit should be simplified a bit.
If you take a good look at the circuit, you’ll see that a lot of mumbo-jumbos have been done just to drain power from the serial port. I thought that it was unnecessary. If you are not too fuzzy about power, you can just use a 7805 IC and use an adapter to power your microcontroller on your bread board. If that is done, you can omit all the switching diodes (4148s) and the rare-to-find voltage regulator (LM2936Z-5). (I couldn’t find it in my country, Bangladesh, the shopkeeper demanded that it was just equivalent to 78L05, but the Lancos sheet asks not to use a 78L05)
The total circuit then dramatically reduces to:
(Note the pin numbers here
Note: If you connect pin-4 of parallel port directly with a wire to represent it as MISO, and omit the last track of the veroboard, you can fit the entire circuit inside a serial port connector. But I personally prefer to keep the programmer circuit as close to my bread board as possible.
I took some photographs:

Once you have constructed it on a veroboard you can use Peter Fleury's circuit to test. Just connect the appropriate MOSI, MISO, SCK, GND, RESET lines, and write the program using pony prog.

Note: Questions and Comments are welcome: robin boss (at_the_rate) gmail (dot) com (Exclude the spaces and type properly if you are a human, and not a webcrawler....)

(If you are an absolute new bee, then you probably need to visit this page first to see how the things look like: http://ahsanuc.blogspot.com/)

Update: I suggest you take a look at the further stripped down version here: http://sajiduc.blogspot.com/2008/04/beginners-microcontroller-programming.html)

Visit My Official Website at BUET

Contact Me
Sajid Choudhury
Dhaka, Bangladesh