In System Programming (ISP) For ATMEL Chips: A Step by Step Construction Guide
In System Programming (ISP) For ATMEL Chips: A Step by Step Construction Guide
Overview
"The Code memory array can be programmed using the serial ISP interface while
RST is pulled to VCC. The serial interface consists of pins SCK, MOSI (input) and
MISO (output). After RST is set high, the Programming Enable instruction needs
to be executed first before other operations can be executed. Before a
reprogramming sequence can occur, a Chip Erase operation is
required.
The Chip Erase operation turns the content of every memory location in the Code
array into FFH.
Either an external system clock can be supplied at pin XTAL1 or a crystal needs to
be connected across pins XTAL1 and XTAL2. The maximum serial clock (SCK)
frequency should be less than
1/16 of the crystal frequency. With a 33 MHz oscillator clock, the maximum SCK
frequency is 2 MHz. "
This is as deep as i got in the ISP process, as i am using a ready made software that will handle the transfer
protocol. some more detailed information about the ISP functioning can be found at www.8052.com and at
www.avrfreaks.net. but this is all you need to know to build and use this extra simple programming
device. Now that you know some theory about the ISP, you should be ready to build the hardware interface.
As you will soon discover, it maybe the simplest circuit that will find in this web site!
2.The circuit
This circuit is a modification from an original deign of Jerry Meng, and it is compatible with the
software/cable proposed at www.aec-electronics.co.nz
Important note:
The schematic above indicates a 74LS08 IC, and I did build the programmer with a 74LS08 IC. However, using
a 74HC08, or even better a 74HCT08 IC would be much safer, will give you a better performance and allow you
to use a longer cable.
The circuit almost talks for itself, the only part that may need some explanation, is the 4 AND gates.
Connecting both 2 inputs of the AND gates as shown makes it act like a buffer, to protect the parallel port.
(Shortly, a buffer is a device that will isolate 2 circuits)
Then, the pins P1,P2,P3,P4 have to be connected respectively to P1.5, P1.6, P1.7 and RST in the
microcontroller.
Note than PINs 14 to 25 of the parallel port are on the Components side of the board,
and thus cannot be welded.. but luckily, from all those pins we only need the Ground
(0V) (pins 18 to 25), which were all connected to the board, simply through a single
jumper wire. (you can notice it, it's the orange wire in the shown picture at the left)
Below is another overall view of the device before being encapsulated. Also notice in
the microcontroller end of the cable, which is simple the female connector of standard
pin header. I wont give more details about this part, i'll leave it to your imaginations!
The important thing is to solder the cable to a secure connector instead of leaving the
wires free to touch each others, which could
As Mr Sarma - a regular visitor, reviewer and a friend - suggested, here are some examples showing how to
connect the programmer to different types of microcontrollers:
This is the piece of software that will take the HEX file generated by whatever compiler you are using, and send
it - with respect to the very specific ISP transfer protocol - to the microcontroller.
The software I am proposing was designed to be compatible with a multitude of ISP programming cables. in
most of cases, all the difference is the pins used on the parallel port to
perform the data transfer. The
only thing you need to do is to
go through 'Setup', and chose
the 'AEC ISP' cable pinout. once
chosen, you will notice that it
matches the circuit on this page.
6. User contributions
Khizer Naeem, a student from International Islamic University of Islamabad, shares his
experience in building the ISP programmer found on this page. His various trials and hard work
paid out when he figured out a way of enhancing this ISP programmer. I thank him for sharing
his work, quoted is Khizer Naeem little story: "I was working on the isp programmer for more
than three weeks after i get it working. I have learned a lot of things and would like to bring in
your kind notice.
Khizer Naeem
I have made five attempts of making the isp programmer given on your site, one on bread board two on vero
boards, and two on single sided PCBs. All of these were having the same problem. They didn't worked the most
of the time,like they worked 1:100 attempts to program the microcontroller. Some time the signature was
faulty, sometimes good. Some time the Writing works and the Verifying fails and most of the times writing fails.
I tried shortening the cable and even i made a isp programmer in which the ZIF socket was mounted on the
parallel port side board(no cable LOL)
I then tried making the Asim khan's ISP programmer, its result were worst, "No response from the
microcontroller".I then build the Asim khan's SPI stand alone programmer the problem was same, Working
some times and failing most of the time!
I was about to give up and even arranged the few bucks to purchase a branded
universal programmer, when i struck up with an idea that brought me back to life
in the programmer business.
I usually used the DB-25 Right angle PCB mount socket. I always common
grounded the 18~25 pin of the parallel port with my circuit. This is not enough!
You must also ground your circuit with the aluminum cover of the socket which is
attached internally to the foil of the parallel cable. I am talking about the cover
that surrounds the pins of the male DB-25 socket. Doing this trick, I came back to
life and all of my programmers that won't work previously started working ( Now i
am having a dozen of working programmer LOLs)"
He used USB power supply to power the programmer, and used high quality network cable to
connect the programmer to a PC's prallel port. He used a cable as long as 1.3 m. "This cable is
rated to 550Mhz to provide additional performance and bandwidth over and above the basic
requirements for data communication.. this rj45 UTP Tech. cable cant be cut easily like others
communication cable, its more heavy duty because the copper inside covered by PVC, not
rubber.." says Eddie Wandy. Eddie Wandy