ATMEGE88 to ATMEGA88P
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
-
- Posts: 24
- Joined: Tue Oct 06, 2009 11:44 am
ATMEGE88 to ATMEGA88P
I have an ATMEGA88P on my board and I was wondering if i could alter the makefile to accept the ATMEGA88P instead on the ATMEGA88? If I can, could someone give me some directions?
- dnewman
- Posts: 15
- Joined: Fri Nov 13, 2009 5:50 pm
Re: ATMEGE88 to ATMEGA88P
avr-dude -- at least my version -- doesn't know what an atmega88p is. I'd at least would leave the avrdude settings alone and only worry if avrdude cannot program it. If it cannot, then likely you will need to make a new entry in avrdude's configuration info. Likely copying the atmega88 entry and changing just the signature info. Or, google the topic.
For avr-gcc, you need to change the Makefile to have "atmega88p" in place of "atmega88" for the MCU definition. (I'm basing this upon looking at avr-gcc v3's io.h header file which has an explicit #ifdef to pull in iom88p.h vs. iom88.h and the comment that iom88p.h is for an ATmega88P. Very minor differences between the two: SRAM size and a signature byte.)
However, the real kicker is the fuse bits. Have they changed? You will need to check the respective data sheets to ensure that they have not. Or, if they have, then to know how to update the fuse bit settings which avr-dude makes. Looks like the Makefile uses 0xE2 for the low fuse bits and 0xD7 for the high ones.
The Atmel ap note on migrating from ATmega88 to ATmega88P is at
http://atmel.com/dyn/resources/prod_doc ... oc8035.pdf
Dan
For avr-gcc, you need to change the Makefile to have "atmega88p" in place of "atmega88" for the MCU definition. (I'm basing this upon looking at avr-gcc v3's io.h header file which has an explicit #ifdef to pull in iom88p.h vs. iom88.h and the comment that iom88p.h is for an ATmega88P. Very minor differences between the two: SRAM size and a signature byte.)
However, the real kicker is the fuse bits. Have they changed? You will need to check the respective data sheets to ensure that they have not. Or, if they have, then to know how to update the fuse bit settings which avr-dude makes. Looks like the Makefile uses 0xE2 for the low fuse bits and 0xD7 for the high ones.
The Atmel ap note on migrating from ATmega88 to ATmega88P is at
http://atmel.com/dyn/resources/prod_doc ... oc8035.pdf
Dan
-
- Posts: 5
- Joined: Sun Sep 28, 2008 7:07 pm
Re: ATMEGE88 to ATMEGA88P
Atmega88p seem to function fine as direct replacement of Atmega88.
Programmed with AVRISP using AVR studio, selected 88p chip. Same fuses worked.
I was unable to get the 88p to preform with AVRDUDE even after altering the signature for the Atmega88 to that of the 88p (0f instead of 0a ending)
Under project > configuration options I had to manually set the frequency to 8000000, which has to be done for all 88 chips I do believe, all on int freq of 8MHz.
Then I unchecked the divide clock by 8 in the fuses setting (CKDIV8) and it seemed to program and work correctly. IF I didn't uncheck this, LED blink test was very slow... makes sense I guess. Read some people have to adjust the board tab in avr studio. I didn't, it auto configured itself correctly.
Programmed with AVRISP using AVR studio, selected 88p chip. Same fuses worked.
I was unable to get the 88p to preform with AVRDUDE even after altering the signature for the Atmega88 to that of the 88p (0f instead of 0a ending)
Under project > configuration options I had to manually set the frequency to 8000000, which has to be done for all 88 chips I do believe, all on int freq of 8MHz.
Then I unchecked the divide clock by 8 in the fuses setting (CKDIV8) and it seemed to program and work correctly. IF I didn't uncheck this, LED blink test was very slow... makes sense I guess. Read some people have to adjust the board tab in avr studio. I didn't, it auto configured itself correctly.
Please be positive and constructive with your questions and comments.