A. INTRODUCTION
First time I learn the MCS51 series microcontroller, I made a board like 8031-AH version. That was a maximum system types. The chip programmed once with a monitor program like paulmon. Using a programmer type like EasyDownloader v2.2s is very-very nice. Then when I make another kind of circuitry, using a minimum types design, the overload then rise up by put and remove the chip to programmed. The mesh is very frustrating. Could you imagine to get the perfect firmware (as my imagine) you must done the same things a few times, boring! Wasting time and the pin chip may also worn out too! Now this is another kind of design but use a minimum system types using Atmel MCS51 S-series with ISP programming. So with this kind of board, the chip do not need to remove just programmed on board. Programed using ISP programming could be done directly through LPT parallel port. There are many programming software could be found on the internet. Some that I could find and much realiable eq.: AEC-ISP programmer, this kind is DOS version. Could be download at : AEC-Electronics. Also ISP programmer made by Asim Khan, could be download at : Asim Khan's ISP software, this kind is a windows version. Besides that there is software from Adam Dybkowsky which run both version of programmers. It could be found at : Adam's Home Page ISP PROG ATMEL89Sxx. Every programmers used its own ISP cable. There are many kinds of pin connections between these programmers, but I alredy tested for both of these 2 kinds of programmers. They are more reliable, among any kinds of LPT port from each computer. Some people succeeded while the other not. Some of them suggested using an IC buffer to interface the LPT parallel port, but I tested it with direct cable connection. It doesn't matter, all can run smoothly. For AEC ISP cable, the connection could be found from the software itself or from Ibrahim Kamal design. Asim Khan ISP PGM cable could be found at : cheap Loader Cable of Asim's ISP for 89S51/89S52, Adam's programmer could be use any kind of cables connections, include for both of those cables. But I did not test all of the connections. Asim's ISP PGM cable is the same as SI Prog cable option. Both of these cable connection (AEC-ISP cable and ISP-PGM cable) could be run on this software. Some people made these cable connections and tested at their own computer with bad result, while some people were succeed. There was another kind of cable connection. I found it at : mytutorialcafe.com, for using with Atmel ISP programmer software. But I could not run it well on my computers. I think that both AEC-ISP cable and ISP-PGM cable are the most reliable cable connection for any other kind of LPT parallel port from many computers
USB ISP Programmer for ATMEL AVR ATMega ATTiny 51 Board
B. In System Programming (ISP)
What is an ISP programming?
This kind of explanation I took from IKA web site :
ISP is a way to serially program your micro controller, while it resides in its place, in other words, without removing the chip from your board. Whether you're just starting in the ATMEL micro controllers, or you're familiar with it, ISP (In System Programming) will provide you a simple and affordable home made solution to program and debug your micro controller based project. ATMEL release some of their product with these ISP programming, the chips sign with S-type, like AT89S51, AT89S52, etc.
Normally, the flash memory of an ATMEL micro controller is programmed using a parallel interface, which consists of sending the data byte by byte (using 8 independent lines for the data, and another bunch of lines for the address, the control word and clock input). On the other hand ISP is performed using only 4 lines, and literally, data is transferred through 2 lines only, as in a I2C interface, where data is shifted in bit by bit though. MOSI line, with a clock cycle between each bit and the next (on the SCK line). MISO line is used for reading and for code verification, it is only used to output the code from the FLASH memory of the micro controller. The RST pin, which is normally used to reset the device, is also used to enable the 3 pins (MOSI, MISO and SCK) to be used for ISP simply by setting RST to HIGH (5V), otherwise if RST is low (0V), your program start running and those three pins, are used normally as P1.5, P1.6 and P1.7. Here is ISP Programming sequence as described in ATMEL datasheets:
"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 isrequired.
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. "
"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 isrequired.
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. "
C. SCHEMATIC
As usual I start my design from my experience design before. There are 4 ports available for interfacing device using 2x5 header, 1 terminal for power source using 2x1 header and 1 terminal for ISP cable using 1x6 header. The board consist of x'tal clock, r-c circuit to perform system reset, and also common IC regulator +5V supply. The microcontroller itself could be use Atmel S-type series microcontroller (eg.: AT89S51, AT89S52, AT89S53, AT89S55, AT89S8252), as this type also become more popular and more cheaper too.
Here is the schematic board.
D. PCB LAYOUT
Because the circuitry do not much have devices, PCB for this minimum system board could be done with size 5.5x7.5 cm. Small enough for the experimenter board. The layout could be drawn using hand drawing also or you can use toner transfer paper. My own prototype made using a hand drawing.
Here are the PCB design and the PCB layout.
E. PART LISTS
Part list for this ISP minimum system board are :
1. Resistors : R1 = 10 kOhm ......................... 1 pcs R2 = 470 Ohm ......................... 1 pcs RP1 = 8x10 kOhm ......................1 pcs
2. Capasitors : C1,C2 = 33 pF ..........................2 pcs C3 = 10 uF/16 V ..............................1 pcs C4 = 220 uF/16 V ........................ 1 pcs C5 = 100 uF/16 V ............1 pcs C6 = 100 nF .................................1 pcs
3. Semiconductors : IC1 = AT89S52 (Microcontroller, another S-type) .....1 pcs IC2 = 7805 (Variabel Regulator) .................... 1 pcs IC3 = 74LS244 (2-Quad Buffer, optional) ......1 pcs BD = 4 x 1N4007 (silicon diode) .................. 4 pcs LED1 = Red 3mm ................................. 1 pcs
4. Others : Optional IC socket for 40-pins ...............1 pcs IDC connector, 10-pins (4 x I/O ports) ......... 4 pcs SIP connector, 6-pins (ISP cable) .............. pcs SIP connector, 2-pins (power supply) .......... pcs X'tal = 11.0592 MHz (another kind) ............... pcs DB-25 connector type (male) with housing .... pcs Single layer PCB, size about 5.5cm x 7.5cm ........pcs Transformer P=220V, S=9~12V/0.5A (Adaptor) ......1 pcs
F. SOFTWARE
Software available for ISP programming :
- AEC-ISP software (49.525 Bytes), DOS version, last update could be found at : AEC-Electronics.
- ISP-PGM software (177.434 Bytes), windows version, last update could be found at : kswichit site Asim Khan's ISP software.
- ISP-PROG software old (166.763 Bytes) and new (182.470 Bytes), windows version, last update could be found at : Adam's Home Page ISP PROG ATMEL89Sxx.
G. ISP CABLE
There are many kinds of ISP cable design, but choose the type that run on your computer. Because if some could run on any people computers, some couldn't. My best experience, the AEC-ISP cable connection and ISP-PGM cable (asim Khan) connection works good for any other kind of computer (LPT parallel port types).
- AEC-ISP cable using buffer (77.841 Bytes) design by Ibrahim Kamal, AEC-ISP cable direct (49.525 Bytes) from the software itself.
- Asim Khan ISP-PGM cable using buffer (7.697 Bytes), ISP-PGM cable direct (25.752 Bytes) connection.
- Many kind of cable connections (182.470 Bytes) from Adam's software.
4.Pocket AVR Programmer
H. PROTOTYPE
My prototype board has size of about (5.5 x 7.5) cm single side PCB. This is a small possible size that make it comfortable to use and making it using a hand drawing layout. All it takes are a small PCB with ATMEL S-series microcontroller, a DIY parallel cable, and a wallwart small power supply type. It takes worth to experiment with this type of microcontroller. The complete package can be obtain here.
I. USBASP CARD
Recently, a few years to today, many computer like laptop or netbook has already removed the ability to communicated the peripheral with serial or parallel port. So, it's a little difficult for us to play a round with diy gadget connected to these ports. Many include only with usb type port. I already made the serial or parallel port type programmer, both are best and useful. After I learn the book from reference below, and start searching the net, many people design a new programmer using usb port type. Some sites, I found a free design of usb programmer. Many are based on Thomas Fischl usbasp version firmware (the latest firmware is 2009-02-28, when I visited). This usbasp version used to programmed Atmel AVR type microcontroller. But some people make the great modification, so the usbasp programmer can be used to program AT89S series also. This is useful for me, since I still playing with these kind of microcontroller. The link could be found here modified USBasp for AT89S series and the firmware usb51.zip (108.71 kb). Don't use the new version of Fischl firmware, because it's not compatible with Atmel AT89S series, just use the firmware from usb51.zip modification only. The core of usbasp is Atmel ATMEGA-8 AVR type microcontroller. This chip must be programmed with USB51, main.hex firmware. For this modified USBasp programmer, I use the latest version 1.72 ProgISP software programmer from ZhiFengSoft. If everything is fine then the modified USBasp programmer can be used to program Atmel AT89S series chip.
1. SCHEMATIC
My circuit design follows Thomas Fischl usbasp version design, but with modification of course to accommodate programming AT89S series. Starting from the original design, and a few from another design, then the result is like this. Note that the free socket for 28 pins intended to programmed ATMEGA-8 type to update firmware. But I don't try it. If you think that it's useless then it may be omitted. The other sockets are 40 pins socket to program AT89SXXXX series and 20 pins socket to program AT89S2051/52 or AT89S4051/52 series. Note that, also any option for powered the chip from external power or from USB power itself, and external connection ICSP cable to programming the chip in the circuit option. More versatile version.
Here is the schematic board (at89sxxxx_usbasp_schematic.sch, at89sxxxx_usbasp_schematic.pdf).
2. PCB LAYOUT
PCB design using single layer copper board. Only needs a little carefully path to drawn. My prototype size about 6.5x10.5 cm. Not small enough compared to other design, but already included all. The layout could be drawn using hand drawing also or you can use toner transfer paper. My own prototype made using a hand drawing.
No comments:
Post a Comment