Parallel Port Programmer for ATMEGA 16/32

In-system programmer means we can design a programmer circuit using simple parallel port interfacing such that our controller can be directly burned with the program while in the designed system or circuit board.  

 

Following pins of Atmega16 are used in programmer circuit- 

 

  • SCK – Port B, Pin 7

SCK: Master Clock output, Slave Clock input pin for SPI channel. When the SPI is enabled as a Slave, this pin is configured as an input regardless of the setting of DDB7.When the SPI is enabled as a Master; the data direction of this pin is controlled by DDB7. When the pin is forced by the SPI to be an input, the pull-up can still be controlled by the PORTB7 bit.

 

  • MISO – Port B, Pin 6

MISO: Master Data input, Slave Data output pin for SPI channel. When the SPI is enabled as a Master, this pin is configured as an input regardless of the setting of DDB6. When the SPI is enabled as a Slave, the data direction of this pin is controlled by DDB6. When the pin is forced by the SPI to be an input, the pull-up can still be controlled by the PORTB6 bit. 

Pins of Atmega16 used in parallel programmer circuit

 

 

  • MOSI – Port B, Pin 5

MOSI: SPI Master Data output, Slave Data input for SPI channel. When the SPI is enabled as a Slave, this pin is configured as an input regardless of the setting of DDB5. When the SPI is enabled as a Master, the data direction of this pin is controlled by DDB5. When the pin is forced by the SPI to be an input, the pull-up can still be controlled by the PORTB5 bit.

 

  • RESET-Pin 9

Reset Input. A low level on this pin for longer than the minimum pulse length will generate a reset, even if the clock is not running.

 

  • VCC -Pin 10 

Digital supply voltage(+5V).

 

  • GND-Pin-11

Ground.

 

Parallel Port-

 

Parallel Port interfacing is the simplest method of interfacing. Parallel Port’s are standardized under the IEEE 1284 standard first released in 1994. It has data transfer speed up to 1Mbytes/sec. Parallel port is basically the 25 pin Female connector (DB-25) in the back side of the computer (Printer Port). It has 17 input lines for input port and 12 pins for output port. Out of the 25 pins most pins are Ground and there is data register (8 bit), control register (4 bit) and status register (5 bit).

 

Pin diagram of Parallel Port

Figure-Pin diagram of Parallel Port

 

Following Pins are used in parallel port-

 

Parallel Port Pins

 

Interfacing -

 

In programmer circuit pins of parallel port which are above described has to interface with pins of ATmega16 microcontroller which are responsible for in-system programming. The parallel port can be interfaced directly with microcontroller. To avoid reverse current we can use Schottkey diodes as safety precaution for pc motherboard.

Following pins of Parallel Port and ATmega16 are to be interfaced-

 

Parallel port and Atmega16 interface connections

 

 Ciircuit diagram of Atmega16 Programmer

Figure-Circuit Diagram of ATmega16 Programmer

 

SOFTWARES USED:

  • WinAVR– WinAVR is open source package in which we use two sub-programs.
    • Programmers Notepad
    • Mfile.
  • Version- 2.0.8.718-basic
  • Creator- Simon Steele
  • Purpose-  
    • To write code.
    • To compile coding.
    • To generate Hex Code.
    • To burn Hex code.

The next tutorial will make you aware with how to install and use WinAVR for compiling and burning the program.

 

Regards:

Aditya Sharma

(http://robozeal.blogspot.com)

 

Comments

Member since:
15 December 2009
Last activity:
7 years 18 weeks

I have checked your site and I invite others please check it because the information that is available on your site can spell bound any one. and the images that you have shown in this site also very attractive.

Member since:
15 March 2009
Last activity:
7 years 36 weeks

Your Query will be surely answered on this link.. Post as comment there...

http://robozeal.blogspot.com/2009/06/parallel-port-programmer-for-atmega.html 

Member since:
27 July 2009
Last activity:
7 years 38 weeks

hi  i've build the circuit exactly... i've checked the connections.... everything seems to be alright.... but when i do the prob test after connecting the programmer to the printer port it says test failed.... any suggestions???

i also ignored the msg nd proceed with writing the program but it says device missing... error code -24.... any suggestions.... i'm using pony prog....

Note:- This post has been edited by coolspark at Thu, 2009-07-30 14:11.

Member since:
15 March 2009
Last activity:
7 years 36 weeks

A saperate USB circuit on the same chip can be designed for taking the power supply of +5V, i.e. Vcc from the USB port of the CPU... Then a saperate USB cable is also required for connecting the Programmer to the CPU. 

Is nessesary to use saperate battery, can't we use +5V supply from the PC...

Member since:
15 March 2009
Last activity:
7 years 36 weeks

Here is the snapshot...

 

 

Member since:
15 March 2009
Last activity:
7 years 36 weeks

Thanks a lot... 

That's very simple circuit, nice, handy and easy to build..