avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [avr-gcc-list] RE: Question about programming a ATMEGA128


From: Larry Barello
Subject: RE: [avr-gcc-list] RE: Question about programming a ATMEGA128
Date: Sun, 12 Dec 2004 10:57:09 -0800

SS is not used for SPI programming.  Reset, MISO, MOSI and SCK are used.

If /PEN is low and reset is asserted, then the chip is in ISP (spi)
programming mode.

The usual mistake on the 128 is to assume the SPI port is the ISP port.
They are not the same thing (although they ARE the same on almost every
other chip).

-----Original Message-----
From: address@hidden
[mailto:address@hidden Behalf Of wbounce
Sent: Sunday, December 12, 2004 10:27 AM
To: address@hidden
Subject: [avr-gcc-list] RE: Question about programming a ATMEGA128


After reading the datasheet last night, I realize the Port B pin 0 that
I am using for the onboard led has a dual function of SS which is used
during SPI programming.

The program loaded in the chip does  DDRB = 0x01; as the 1st line of
main.

Then it inits the timers, pwm, and uart; prints a welcome message;
delays for 500 ms; then starts a loop that toggles portb pin 0 among
other things.

I am guessing the DDRB statement setting the pins as output and the pull
up registers are pulling it high and this is causing my programming
problem.

How can I reprogram my board? I looked at the AVRdude documentation and
did not see anything obvious to help. I am open to all ideas..

Sorry if you replied to my original post. My list option is digest and I
won't see your responses until tonight. And I can not see the list
online right now because my internet browsing is down even though I have
email.


_______________________________________________
avr-gcc-list mailing list
address@hidden
http://www.avr1.org/mailman/listinfo/avr-gcc-list



reply via email to

[Prev in Thread] Current Thread [Next in Thread]