Home Products Prices Site Map Order Contact What's New Books Free Files Links FAQ
Dontronics AVR RS-232 Programmer.
Bottom of Page

see also:
macpic.html

Now programs 1200, 2313, and 8515 with the MAC computer.
 
  • Overview

  •  
  • Parts needed

  •  
  • Assembly

  •  
  • Software

  •  
  • Testing

  •  

    Antti Lukats of Sistudio, some time ago, designed a fullly featured RS-232 driven, In-Circuit programmer for the AT90S1200 using a small DT003 motherboard and two DT104 SimmSticks and Avrbasic Application Note #4A

    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!



    Ben  Hitchcock of Wollongong Australia, has taken this a step further and this page, including  the New Asm and Hex files, has been updated by Ben. He has introduced more devices, and explains how below:

    Overview:

    Many AVR programmers use the parallel port to communicate between the target and the computer. If you have a printer connected to your parallel port, or (like my iMac) your computer doesn't have a a parallel port, then chances are this solution will allow you to program AVR's with a minimum of fuss. It uses the serial port (RS-232) for communication, unlike most programmers which use the parallel port.

    The way that this works is that there is an AT90S1200 AVR chip connected to the simmstick bus which acts as a master, and another chip on a simmstick that acts as the target. The master acts as the middleman between the computer and the target AVR. The computer sends the program down the serial line, and the master does all the hard work of programming the slave. The firmware presented here should be able to program the following devices:
     
    Device Tested
    AT90S1200-C Yes
    AT90S1200-D No
    AT90S2313A Yes
    AT90S4414A No
    AT90S8515A Yes
    AT90S8252 No
    AT90S2323A No
    ATMega103C No
    AtMega103D No

    The data in the Tested column represents whether or not I have personally tested this solution. If you get this programmer to program an untested device, then please let Don know, so that he can update this table.

    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.

    The completed programmer presented here should cost in the region of about $100AUD, including the fancy LED board, a master AT90S1200, and a running AT90S1200.


    Parts needed:

  • Base Board
  • Master simmstick
  • Slave simmstick
  • Display board (optional)
  • Base board: (DT003-K)
    In the picture at the top of the page, you can see that the base board used here is a DT-003. You can use pretty much any board that has parallel tracks (such as veroboard) so long as the power and RS-232 connections are set up correctly, but for beginners I recommend the DT003. You will need to add all the components recommended for this board including the MAX-232, all the capacitors, and the power supply section. You could use a DT-006 (little rAVeR) for the base board, but be aware that the target will live on the base board while the master will be a simmstick that plugs into the SIMM socket.

    Master Simmstick: (DT104 + AT90S1200 + 8MHz resonator)
    This is a DT-104 simmstick, with an AT90S1200 and an 8 MHz resonator on it. I use a 20 pin socket to plug the AVR into, but that's a personal preference. Don't worry that there are lots of holes on the board left over, you only need two components per simmstick.

    Slave Simmstick: (DT104 or DT103 + your choice of AVR + resonator)
    You can use any AVR mentioned at the top of this page as the slave. For starters, I'd recommend another AT90S1200 with an 8 MHz resonator, but you could use any combination of AVR and resonator that you like. The 40-pin AVR's work just as well as the 20-pin ones, but you need a DT-103 for the 40 pin devices. Again, the only components needed on this board are the chip and the resonator.

    Display board: (optional) (DT203 + components)
    I like to be able to see what's going on when programming, so I built the display board as well. Since it is just about impossible to fit two simmsticks into neighboring slots, I added another simmstick socket at the side of my DT-003 board. The display board clicks into this socket, and shows the programming dialogue as well as any LED rotation programs that the target board might be running. I recommend you buy this as well - it really helps to figure out what's going on!


    Assembly:

  • Base board
  • Master Simmstick
  • Slave Simmstick
  • Display Simmstick
  • Base Board:
    Start with the base board. You will need to add all the components in the kit. It's pretty straightforward, so you shouldn't have too much trouble. Note that the pins on J1 aren't connected to anything. I used a socket for my MAX232 chip, but that's personal preference. I also added another SIMM socket to the edge of my base board so that the display simmstick could be plugged in while programming.

    Master Simmstick:
    After soldering in the resonator and the socket for the AVR, you need to change the connections on J4. Cut the track on the solder side of the board between pins 1 and 2, then link pins 2 and 3 together with either a wire link, or a set of 3 male header pins and test link. This allows the 'master' to take control of the reset line on the simmstick bus and therefore program the slave.

    Slave Simmstick:
    Simply solder a socket into the simmstick, solder the resonator in place, and plug the target AVR into the socket. Nothing to it!

    Display Simmstick:
    You need to buy the extra components for this board from another retailer such as Dick Smith or Jaycar. Assembly is pretty straightforward.

    Software:

  • Programmer firmware
  • Example files
  • Programmer firmware:
    The source code for the programmer is available from the Atmel site, but I modified it so that the pin definitions matched the Dontronics simmsticks. The software was also modified a bit by persons unknown to add more target chips to its repertoire. You can download the assembly source code, and the intel hex file. (11K) A real catch-22 is getting your first AT90S1200 programmed with the programmer firmware. You can either use a parallel port utility such as Jerry Meng's great little DOS Printer Port Programmer Software and hardware, or request that Don burn the programmer firmware into an AT90S1200 for you. He does this for free upon request for any customer that purchases an AT90S1200 chip at his normal retail price, and the burnt chip will have a little spot of liquid paper on the bottom so that you can tell which chip has the program on it. Once you have a chip programmed with this file, you can use this as the master and so burn your other programs into other chips. You can be really sneaky and program another AT90S1200 with the programmer source code, and then use that chip to reprogram the first one! Tricky huh?
    Note: Prior to the first of September 2000, Don had some different firmware that only allowed you to program AT90S1200's. If you bought the firmware before this date, then you need to use that chip to program a new master with the new firmware. If you bought your chips after this date then sweet matey, you have the latest copy of the firmware.

    Example files:
    Getting started with AVR's and especially assembly language can be quite daunting. Here are a couple of files that make the outputs of the AVR turn on one by one so that you can be sure that the board has managed to program the AVR.
     
    Assembler source code Hex file
    AT90S1200 AT90S1200
    AT90S2313 AT90S2313
    AT90S8515 AT90S8515

    These can all be downloaded the single ZIP file avr_232.zip. This is the same one as above and only 11K.

    Note that the programs here are essentially the same: to modify the code for a different target should be quite simple. Just include a different .def file, and you may have to change a few register names here and there, but that should be it. Incidentally, you can program an 8515 (40 pins) with the compiled code for the 2313 (20 pins) and it works fine!

    Testing

    To start with, plug a power supply into the power connector. I use a 10VAC plug pack adapter that used to be the power supply for a modem, but you can use pretty much any voltage between say 6 and 15 volts. AC or DC, it doesn't matter. With the power on, the LED on the base board should glow, and nothing should get hot. (Pretty technical eh?) Once you have this sorted out, plug the master simmstick into the board, and connect your computer to the board with a serial cable. Open up a terminal program (such as HyperTerminal in Windows, or ClarisWorks on a Macintosh) with the following parameters:
    19200 bps, No parity, 8 data bits, 1 stop bit.
    Note: If you use a different master resonator speed to 8 MHz, then you need to scale the baud rate accordingly.
    You can now type a few commands to test that the master simmstick is working properly. To start with, type p to ask it what sort of programmer it is. The simmstick should respond with a S , to show that it is an SPI programmer. Now hit S , to ask it for it's software identifier. The board should respond with AVR ISP . You can ask it for it's software and hardware revision numbers, too, by typing V and v .

    Once you have done this, it's time to program your first chip. To do this, you will need some programming software to run on your computer. Here are two alternatives, for Windows and Macintosh computers:

    Windows

    Macintosh

    Once this software is installed, you should be able to plug the other simmstick into the bus, and program the relevant LED rotation program into your chip. Hopefully then you will see the LEDs blink, and blink, and blink...

    What if it doesn't work?
    Rather than go one on one with Don, which he doesn't mind, you can always send a message to the Atmel list so that others can benefit from the answers. He may answer anyway, but then he's not always available. There is also the SimmStick User list, which in fact may be more appropriate for a SimmStick question. You will find many people subscribed to the SimmStick, atmel, and piclist as well, and they are generally very helpful. Have a look at chat.html for details.

    I have found this programming solution to be more than adequite for my needs, and I hope that it is of use to some of you. Good luck!
     
    Home Products Prices Site Map Order Contact What's New Books Free Files Links FAQ

    Dontronics

    _
    Copyright © 1996-2005 Dontronics
    Top of Page