How to get started

I recieved my board.

My computer does not recognize the board. I have tried both the atmega32 it shipped with and one from by avr course. Neither is detected.

Can someone suggest a way to detect the board. I tried forcing avr studio and the port to COM 1. I also tried various clock frequencies and baud rates.

Also note that the board I recieved had an atmega 32 installed upside down, the USB connector is the top of the board correct?

What board are you talking about, george?

AVR-P40-USB

dated 2004

I THINK that to program a chip using that board, you also need an ICSP programmer. As far as I know, the USB connection is just a serial port to connect the chip to the computer for communication. To program with that port, a bootloader must already be loaded into the chips flash memory.

Somebody please correct me if I am wrong. I am knew to this myself.\

Best Luck,

Aaron M

I’ve not used that board but I have used many othe AVR boards.

I believe that the board has a USB-to-serial converter on the board. The serial port of the AVR chip connects to the USB-to-serial converter chip.

If the AVR mega32 chip you are using is “virgin”, i.e., it has no pre-programmed code in it for a power-on demo, then nothing will happen on that USB port connected to a PC. When you first connected the USB to your PC I’d expect you to have gotten the usual MS Windows XP pop-up windows about discovering a new USB device and that it is a USB-serial adapter. When that concluded, you should see a new serial port such as COM4: in the Windows Control panel/device manager/hardware.

The board derives power from the USB port so be sure to unplug the USB cable when changing chips, diddling, etc.

If I’m correct that you do not have a pre-programmed mega32 chip, i.e., its flash memory is erased to all ones as is the usual case then you need to program that chip or get a pre-programmed chip - and the pre-programmed chip has to be arranged to use the same crystal frequency that you have. The mega32 board that I have came from PRLLC (who have changed their name now) and is pre-programmed. It is programmed with a serial port bootloader.

Many AVR chips can use a serial port bootloader- to receive from the PC a program that you wrote using any compiler, the Studio assembler, FastAVR, BASCOM, etc. All of these tools yield a “.hex” file which is what goes out the serial port and into the AVR’s serial port and is received by the on-chip bootloader. As the .hex data comes in from the PC, the bootloader stores in into flash memory.

Now there are many bootloaders for the AVR out there. Most are free. PRLLC sells one pre-installed in the mega32. Others you get from the public domain and YOU write the bootloader into the AVR chip once. To do this (catch-22 coming) you need an in-system programmer (ISP) or ISCP, same idea. This is a $30 “dongle” you buy from Atmel or other source. It plugs into the 6 pin ISP connector that most AVR boards have. Another newer way is to use an ISP designed for the JTAG connector on some AVR boards.

Now if you buy or borrow an ISP device, you can burn into flash not only a bootloader, but the program you are developing. In fact, with the ISP, you can just skip using a bootloader. This is OK if for the future you will always want to load your program using an ISP device rather than a serial bootloader.

The best PC program for serial downloading is called BLIPS 2.1 and it is on the AVRfreaks.net website in the Academy’s user projects. It must be the best because I wrote it (ha!). It can connect to your bootloader on the AVR via a serial port or via an network IP connection to a device like a Lantronix Xport or WiPort that does LAN to serial. Along with BLIPS is a matching bootloader program to put into the AVR chip… The source code for this is there and it’s easy to tweak for different AVRs and crystals. But you have to have a way to get the bootloader into the AVR since is “virgin”. There’s that catch-22 again.

THere are many other PC-side programs to send a file by bootloader. Most are freeware.

The mega32 board that I have from PRLLC came with a bootloader pre-installed so it was plug and play and no ISP device needed.

I hope this is helps. I have all this stuff if you want me to preprogram a chip for you via us mail.

In my opinion, the best way to start with AVRs is to get one of the stamp-like boards from ZBasic.net. It’s neat, small, and has the best compiler around - very MS Visual Basic-like. Pre-programmed. Compiler is free. Just add power and a DB9 connector to connect to a PC’s serial port.