| Home | Products | Prices | Site Map | Order | Contact | What's New | Books | Free Files | Links | FAQ |
| Bottom of Page |
see also:
macpic.html
Now programs 1200, 2313, and 8515 with the MAC computer.
![]() |
|
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!
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.
Base board: (DT003-K)Base Board Master simmstick Slave simmstick Display board (optional)
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!
Base Board:Base board Master Simmstick Slave Simmstick Display Simmstick
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:Programmer firmware Example files
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:
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 |
_
Copyright © 1996-2005 Dontronics
| Top of Page |