Jump to content

- - - - -

A project about building a programmer for Atmel microcontrollers from AVR family

  • Please log in to reply
No replies to this topic

#1 Qiqing


    New Member

  • New Members
  • 2 posts

Posted 12 October 2017 - 11:17 PM

Hi, everybody!

Today I want to share a simple Serial Programmer design for AVR. Any interests? Then take a time for reading~


Attached File  1AVR.ISP.ASSY.TOP.small.jpg   5.31KB   0 downloads

This is a very simple and easy to build programmer for Atmel microcontrollers from AVR family. The microcontrollers must support serial programming. This programmer is connected to a PC through the RS232 serial interface and can be used with the PonyProg or Avrdude software programmer.



Description of the serial programmer:
The programmer is quite simple and it is based on the SI-Prog from the author of PonyProg software. The Zener diodes D2, D3 with the resistors R2, R3 reduce the voltage from the ouput pins DTR, RTS on the serial port to around 5V which is suitable for microcontroller (MOSI, SCK). MISO signal is connected directly to the input CTS pin. The Zener diode D1 with the resistor R1 drive the NPN transistor T1, which controls RESET signal. The AVR microcontrollers are in reset when the signal has low level. The resistor R5 works as a pull-up for reset signal. The resistor R4 helps to close the transistor T1. The programmer has standard 10 pins header.
Attached File  2AVR.ISP.SCHEMATIC.png   22.34KB   0 downloads
(Schematic of the serial programmer)
Attached File  3AVR.ISP.ASSEMBLY.png   47.57KB   0 downloads
(Assembly diagram)
Attached File  4PCB (top side).jpg   21.36KB   0 downloads
(PCB (top side)?
Attached File  PCB (bottom side).jpg   34.52KB   0 downloads
?PCB (bottom side)?
Attached File  Panelization (When you need more pieces.).jpg   24.04KB   0 downloads
(Panelization (When you need more pieces.))
The transistor T1 should be in opposite position then is depicted in the assembly diagram.
Please check the position of Base-Colector-Emitor on your transistor.
I use this programmer for programming Attiny13, Attiny26, Attiny2313, Atmega48, Atmega88, Atmega168, Atmega16 and it works very well. I also use the programmer with desktop computer, laptop, with and wihout USB-to-RS232 adapter and it works in all cases.
Using PonnyProg2000:
When you want to program your microcontroller with the PonnyProg2000 you have to setup the program as you can see on the following picture. You have to select chosen COM port, where is connected your programmer.
Attached File  Ponyprog IO port setting.png   10.83KB   0 downloads
(Ponyprog I/O port setting)
Using Avrdude:
When you want to program your microcontroller with Avrdude you have to select the keyword "ponyser" as a programmer type and appropriate COM port. I'm using this method to program my microcontroller directly from the Atmel AVRstudio when I'm debuging my application. I create a batch file with the command for the avrdude and I call the batch file directly from the tool bar. It is very fast and easy. Avrdude is also part of the WinAVR package.
Attached File  Microcontroler programming by avrdude.png   13.25KB   0 downloads
(Microcontroler programming by avrdude)
Programming header reduction:
Sometimes you have to program microcontroller in a aplication where is only 6 pins header instead of 10 pins. I created small adapter for this purpose. The adapter has 10 pins header, 6 pins header and 6 pins header in one line. 6 pins header in line is useful when you want to bring the signals to the breadboard.
(Schematic of the programming header reduction)
Attached File  Assembly diagram.png   16.46KB   0 downloads
(Assembly diagram)
Attached File  2Assembled PCB (top side).jpg   7.88KB   0 downloads
(Assembled PCB (top side))
Attached File  2PCB (bottom side).jpg   9.74KB   0 downloads
(PCB (bottom side))
With this equipment you should be able easily program your AVR microcontrollers. Thanks for reading~ :thx: