AVR-PG1 w/ atmega32

Hi all,

I have just recently got an AVR-PG1 programmer, an AVR-P40 board, and two ATmega32 MCUs. I’m using avrdude 5.1 on a mac with a usb->serial converter (Keyspan) to program the chips (at least I’m trying to). The problem is that avrdude cannot seem to find the atmega32. Here is my command:

avrdude -p m32 -c ponyser -P $(UISP_PORT) -e -U flash:w:test.hex

I continually get:

avrdude: AVR device not responding

avrdude: initialization failed, rc=-1

Double check connections and try again, or use -F to override

this check.

If I use the -F command, the verification failes at the first memory byte. If I unplug the AVR-PG1 programmer from the serial converter, the exact same messages come up (with and w/o the -F command), so I am guessing that the error is in the programmer, but not fully sure.

Any responses would be greatly appreciated (and needed – I’m short on time. The BIG part of the project begins when everything works).

Thanks,

Aaron M

I don’t know if avrdude and friends will work with usb-serial adapters. They work by bit-banging the modem control and status lines, not by sending normal serial data, so if the serial adapter takes time to respond or something it might no work. Is there an option to make avrdude slow down? If so, try that.

Thanks for that. It appears that you can overide the baudrate within avrdude. I’ll try it.

But in the mean time, here is what I have found from testing. Not sure if it means anything:

If I attach the positive lead of an LED to the MOSI pin of the Mega32 and the negative to GND, and then load a .hex file with the ‘-F’ option on avrdude, the LED will flicker, as if data is comming through, while avrdude is loading the file.

If I attach the LED in the same fashion to the SCK pin on the chip, and load a file, the same thing happens.

If I attach the LED in the same fashion to the MISO pin on the chip, and then load a file, the LED does not light up at all.

This would lead me to believe that the the programmer is functioning, but the chip is doing nothing. I’m not sure how much data the chip needs to send in this process, though – it may not be enough to even light the LED.


Also, I found, that in the avrdude.conf file, under the entry for ponyser, the MISO pin setting does not appear to match up with the schematic for the AVR-PG1. The configure file says that the MISO pin connects to pin 7 of the serial port, while, from the schematic, it looks as if the MISO pin connects to pin 8 of the serial port. I tried changing this, but it still didn’t work.

I can’t tell if I’m just misinterpreting this.

Any ideas greatly needed.

Thanks,

Aaron M

Any Ideas?..Moderators?..Anybody there??

Oh, and baud rate has no effect. That’s probably not the thing you were thinking of anyway, wiml.

And something else peculiar: When avrdude is trying to program the chip, the reset line goes low for for the duration of the programming. Is this normal? It seems as if that would turn the micro off while the ISP is trying to send or recieve data from it.

…Ok, here’s an easy two for you, OLIMEX, or any one else:

  1. What is the purpose of the LED on the development board (P40). Is it supposed to light up when everthing is working properly (it doesn’t), or is it activated by code?

  2. What is the purpose of the button other than the reset button on the board? Should it be used for programming?

AaronM:
Hi all,

I have just recently got an AVR-PG1 programmer, an AVR-P40 board, and two ATmega32 MCUs. I’m using avrdude 5.1 on a mac with a usb->serial converter (Keyspan) to program the chips (at least I’m trying to). The problem is that avrdude cannot seem to find the atmega32.

Lest I ask the obvious, have you tried to use a real serial port rather than the USB->serial converter, to eliminate one unknown in the equation?

I run the Atmel Serial port ISP that connects to the ISP connector on AVRs - via USB->serial and ethernet->serial without problems.

But that PG-1 looks, by its schematic, like it relies on bit-fiddling the serial port lines. This is a too marginal design for other than using a “real” serial port.

USB-RS232 converters mess up the timings so you can’t use AVR-PG1 with such converter as it will not meet AVR programming specs

you need real RS232 port

Tsvetan

I just ran into this problem using an ATtiny2313. I can confirm that switching to a ‘native’ serial port (in this case, using a PCI expansion card) fixed the problem.