newbie question; how to load code to chip?

I'm interested in learning about and programming embedded microcontrollers. I'm on a shoestring budget though. I'm looking at the Atmel AVR chips since there is a large user community for them.

In order to get my feet wet is it necessary to get the STK500 development board or can I get started with a basic AVR chip and a solderless breadboard? It seems to me that from a hardware perspective I should go the breadboard route since I'll need to learn how to hook things up. But from the software development standpoint I don't understand how I download code to the chip when using a breadboard. It sounds like if you have the STK500 and AVRstudio downloading code is a snap.

It sounds like with the breadboard route I could use the ATAVRISP to download my code but I didn't understand its tech sheet's explanation of the circuit needed.

(I know how to program in C and other high level languages, but electronics is where I'm starting from scratch.)

Thanks for any advice.

Reply to
Rusty Wright
Loading thread data ...

The simplest way to get started is to use the SP12 interface:

formatting link

It's just a couple of resistors, some wire, a DB-25 connector for the printer port, and five connctions to the target system.

With the SP12 software you can program the chip in your breadboard, after developing the software using AVR Studio.

Leon

Reply to
Leon Heller

You're right, the AVRISP gadget is probably the best way for you to go. Building your own might be a bit cheaper (if you already have most of the parts) but $30 buys the assurance that the programmer and the programming software talk to each other and that the programmer itself is assembled correctly.

The AVRISP comes with two programming cables: a 2x5 and a 2x3. The 2x3 cable is the same one that is used on the STK500. In fact, the STK500 can be jumpered so that it can also be used to program parts on a separate breadboard using either of the two cables.

For typical AVRISP in-system programming on a "real" circuit board, the

2x3 or 2x5 ribbon cables would plug into a 0.1"-center pin header. As you probably noticed, this won't work with the usual breadboard. What I do is use a cable that has a DIP-plug on one end and a 2x5 socket on the AVRISP end. The DIP-plug fits across the "valley" on the breadboard so the signals are separated.

You could use individual jumper wires that plug between the breadboard sockets and the sockets on the ARVISP programming cable. That is OK but is also one more place where wiring errors can creep in...

Note that it is recommended that the AVRISP *not* be plugged into or removed from the target board when the target board is energized.

As far as the circuit needed, just match the corresponding pin-labels between the AVRISP termination plug and the pins on the AVR chip:

VCC .----. VCC .----------------------------o | . | .-----. | | | | VCC| | MOSI MOSI | | '------o-------o-----o o----------------o | | | | | | | GND| | MISO MISO | | .-. .-----o o----------------o | | | | | | | | 10K | | === | | SCK SCK | | '-' GND | o----------------o | | | | | | | RST*| | RST* | | '-------o-----o | .---------o | | | | | | | | | | | GND | | | | | | .--o ISP| | | | | | '----' | | | | | | | | | | | | | | | | | | | | | | | | | | | | | === | | | | GND | | AVR | | | '-----' | | | '------------------' (created by AACircuit v1.28 beta 10/06/04

formatting link

--
Rich Webb   Norfolk, VA
Reply to
Rich Webb

I probably have a profile very similar to your's (sofware guy wanted to learn more about digital electronic), and I bought a low-cost developement board that would:

- allow me to become familiar with the AVR architecture without having to buy expansive programmers or even worse for me, having to build my own programmer...

- use what I would learn to build my own system from scratch, using my development board to program the AVR.

I ended up buying an AT90S2313 based board for $19.90:

formatting link
- I guess STK500 is around $100 ??? -

The board came with a Windows application that would program the AVR on the board with the content of an Intel Hex file produced by avr-gcc or arv-as.

I now have two boards working, the development one, and the one I built from scratch and am very proud of ;-).

The AT90S2313 was good enough for me, but you can probably use the same approach and with an ATMega for $32.00:

formatting link

At the time I bought my board, programming software was only available for Windows 9x, which was not a problem for me since I had a multiple boot installation.

(Using Windows 2000 drivers for making parallel port available to old DOS/Win9x software did not work for me)

You may have to check with the vendor in order to know they have a new version of the software if you don't have a Windows 9x system available

The following article does contain a lot of very valuable information for starting programming an AVR in C:

formatting link
formatting link

Jean Tabel

Reply to
Jean Tabel

Have a look at:

formatting link
this will give the schematics and software to build your own, plus a large explanation of the steps taken.

Don...

--
Don McKenzie
E-Mail Contact Page:        http://www.e-dotcom.com/ecp.php?un=Dontronics

VoIP USB/RJ11 Use Any Phone http://www.dontronics.com/phoneconnector.html
USB to RS232 Converter that works  http://www.dontronics.com/usb_232.html
Reply to
Don McKenzie

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.