Home  Products Prices Directory Order Contact New Books Files Links Other
DonTronics Home Page AVR RS-232 Programmer.
Bottom of Page
 
Using Avrbasic Application Note #4A, a pair of DT104 SimmStick's, and a guiding hand from Antti Lukats of Sistudio, I have been able to fire up a fully featured RS-232 driven, In-Circuit programmer for the AT90S1200.

One of the most common questions I am asked is "What is this SimmStick business all about"?
People have trouble understanding the concepts. I sometimes feel like it would take a large book to get the message across. "Is it just for kids and student training"? No, it's for everyone. I see a major function as being for industrial control applications. I believe this project is a good example of just one Simmstick concept. The main theme with SimmStick is "Cost-Effective".

At $8AUD (~$6USD) in singles for 1 Inch SimmSticks, that translates to cheap.

Two identical boards. One is a programmer. One is a target. The programmer (bus master), takes control of the bus. the target board (slave) responds. After the target device is programmed, the master then releases the bus to the slave which now has control of the bus.

With a simple one link alteration, the master and slave roles can be reversed. You could use the new master to reprogram the new slave.

The pair of DT104 SimmStick's requires a minimum of 4 components on each board to work. Yes, I know it's a big call, but here is the list.

On each board:
1 by AT90S1200, 1 by 16Mhz crystal, 2 by 15-30pf caps for the C3 and C4 positions across the crystal.. You can refer to the assembly instructions for the DT104, and all other boards by clicking on the appropriate links on this page.

A hardware link on the programmer board is set to the program mode. This is done with J4. Cut the track on the solder side of the board between pins 1 and 2. Link pins 2 and 3 together with either a wire link, or a set of 3 male header pins and test link.

The target board remains at the default manufacturers settings.

A Simm bus board like the DT003, or DT001 (or a simple DIY) needs to be used to provide power and RS-232 comms. A LED monitor board like the DT203 is great for testing the LEDTEST.HEX file that comes with the Windows software driver that is straight from the atmel home page site.

The catch-22 is getting your first 1200 programmed. I used Jerry Meng's great little DOS Printer Port Programmer Software and hardware for the first one, however as Antti has made the programmer 1200 hex file available to everyone for free, I'll burn it for free upon request for any customer that purchases an AT90S1200 chip at my normal retail price. I hope this gets a few more people working on AVR developments at a minimal cost and time frame. As the Basic source code is available in Antti's App Note#4, I see users getting into non-PC platforms very quickly.

OK, burn a 1200 with the PGAVR104.HEX file, or purchase one from DonTronics for just the normal retail cost of an AT90S1200-16PC. Just make sure you request that it be programmed with this file. It will have a small spot of white liquid paper on the underside of the chip to indicate it has been programmed.

Or program your own. I found that I had to add a 680pf capacitor between pin 19 and ground of Jerry's circuit to get it to program reliably however I did use about 6 feet of printer cable I must admit. I had an old PCB that just happened to have a DB-25 connector and a position for a 20 pin DIP socket. The minimal amount of wiring required, allows you to hook this up very quickly for a good result. I wired up the 4 diodes for power input, and have experienced no problems.

Plug the programmed 1200 into the DT104 programmer board (the one with J4 altered), and plug your now assembled programmer into a Simm Bus slot of a DT003 or DT001. You can easily make your own home brew SimmStick development platform out of some suitable vero board if you wish, just emulate the power supply section and MAX-232 comms circuit as shown in the DT003 schematic.

Connect it up to a comms port on a PC running any terminal program at 19200,N,8,1.
If you check the basic code in Antti's Application note, you will quickly see what the results should be for certain keys pressed, but to shorten the cycle a bit, if you press "V" the module should return "60", and a "v" should return "00". This asks for the board version number, and an "S" query will return the board I.D. as "AVR DEV".

This means you now have communications with your DT104 Programmer, a good start.
Download, install, and run the Atmel AVR Windows Software driver. This will soon tell you if you have comms with the programmer as you will be able to see the board I.D. and version number. In fact, if it doesn't find a programmer, it will display the message "No supported board found!".

At the time of writing, the Sistudio PIP04 AVR RS-232 driver isn't completed, however built in, is a simple LPTx driver that works in much the same fashion as Jerry Meng's, but unlike Jerry's, it uses a Crystal in the programming circuit, so it won't drive Jerry's programmer.

If you have got this far, and have no questions, then you did better than me, but then someone had to interpret Antti's concepts and make sure it was all workable. He is good at doing 17 things at once. If I can follow one of them, I feel I have done well.

Rather than go one on one with me, which I don't mind, you can always send a message to the Atmel list so that others can benefit from the answers. I may answer anyway, but then I'm not always available. There is also the SiUser list, which in fact may be more appropriate for a SimmStick question. You will find many people subscribed to the siuser, atmel, and piclist as well.

Oh, yes the programmer. Glad you mentioned it.
Put a virgin 1200 (sacrifice time) into the target DT104 board, and plug it into the spare slot on the DT003 (or like instrument). With a reasonable amount of luck, you should be able to load the ledtest.hex file that comes with the Atmel driver, and burn the 1200. It should also verify. If it does, time for a coffee. If it doesn't, time for a beer! Perhaps I got that reversed. :-)

It really is that simple.

The DT003 has four slots, but unless each board is loaded with surface mount components, there is now way known you can get 4 boards plugged into it. Even 3 may well be a tight squeeze. Prototypes are commonly polulated with lots of sockets and link header blocks, and if you are like me, stacks of ZIF sockets, so to get two DT104 boards, plus a DT203 LED board hooked together, may require you to extend the bus or boards in some way.

Many ways of doing this. Use a set of male and female pins and solder a straight set of male pins to a single row Simm Socket. Solder a row of right angle female pins to the end of the DT003 board. This will enable you to plug the Simm Socket into the end of the board and use this extra slot for any board.

What I did was to make up a 20 pin ZIF to machine pin socket adapter and plug this into my target board. The target board then plugs into the end of the DT003 board. Two rubber feet makes it into a nice pad for programming multiple AVR chips.

With the LED board plugged in, you can see the D5, D6, D7 LED activity during programming. This is the programming board doing its job. When programmed, the target board takes control and will drive the full 8 LEDs after programming. D9 is used during the programming mode, and if required, the J6 link can be isolated on the programmer board.

Once you program the LED test file, you can then burn the PGAVR104.HEX into a spare 1200 as a backup firmware chip. Didn't your Dad always tell you to do backups? And then for a bit of fun, you can test it. Neat huh?

Users have had problems burning a 1200 chip if the target has code that uses pin 3 as a software Uart. This doesn't appear to be a problem if you are burning the "PGAVR104.HEX" file.

You must isolate pin 3 of the two 1200's. This can be done as follows:

You can use a socket and lift pin 3, the TX (or SO on the simmstick bus) by using an extra machine pin socket and snapping pin 3 off. When you insert the target 1200 into the extra socket, it doesn't connect with the Simmstick.

As an alternative, you could always cut the track to the "SO" edge connector and jumper two wires to the proto area and use a set of male posts and a test or shunting link to make and break the connection easily.
 
Home  Products Prices Directory Order Contact New Books Files Links Other
 

DonTronics Home Page

mailto: don@dontronics.com_
Copyright © 1996-99 DonTronics
 
 
 
Top of Page