Pages: 1 [2] 3   Go Down
Author Topic: ATmega328P // 32k 28-pin dip  (Read 3497 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 12
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I thought the other picopower atmels in this series (48p,88p,168p) could only run at 10mhz   - can this one run at 20?  or were you thinking of the using the mods (I think they were added for the lilypad?) that allows for slower clock?
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 205
Don't Panic
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The pico-power chips come in both 10 and 20 variants (see ATMEGA168P-20PU and ATMEGA168PV-10PU).
Someone else could likely comment better, but my literature shows the Pico-power enhancements are primarily more/better sleep modes, so having both speed/voltage ranges still make sense.
Logged

iDuino - MaxSerial - [url=http://spi

The Netherlands
Offline Offline
Newbie
*
Karma: 0
Posts: 26
Arduino-ing my Mazda MX-6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@Ladyada: What did you change in the bootloader code (youtalked about "porting"). Is there anyway you could share this code so I/someone else could burn my own atmega328? I'm running out of program memory fast here.
« Last Edit: May 22, 2008, 05:52:57 am by QuickSander » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Does anyone know where we can get these ATmega328P chip from and ladaya can you please post the bootloader somewhere so we can test that out.

I see mouser has got them but their on order  Mfr. Part #ATMEGA328P-PU would be really great if someone can point me to a place that has them in stock, and where to download the bootloader and instructions to put that on it.

Thanks in advance.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 239
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

well considering the arduino IDE can't compile sketches for the atmega328 it doesn't really matter at this point smiley
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 205
Don't Panic
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

After about 2 hours of hacking, my Arduino 11 Windows install can indeed compile code for the 328 and avrdude's config has been patched. Unfortunately I haven't bothered hacking the bootloader yet (it's after 4AM and I need to be up at 7AM to see the Microchip folks).

Quote
C:\Documents and Settings\spiffed\Desktop\arduino-0011\hardware/tools/avr/bin/avr-gcc -c -g -Os -IC:\Documents and Settings\spiffed\Desktop\arduino-0011\hardware\cores\arduino -w -mmcu=atmega328p -DF_CPU=16000000L C:\Documents and Settings\spiffed\Desktop\arduino-0011\hardware\cores\arduino\pins_arduino.c -oC:\Documents and Settings\spiffed\My Documents\Arduino\Fading\applet\pins_arduino.c.o

C:\Documents and Settings\spiffed\Desktop\arduino-0011\hardware/tools/avr/bin/avr-gcc -c -g -Os -IC:\Documents and Settings\spiffed\Desktop\arduino-0011\hardware\cores\arduino -w -mmcu=atmega328p -DF_CPU=16000000L C:\Documents and Settings\spiffed\Desktop\arduino-0011\hardware\cores\arduino\WInterrupts.c -oC:\Documents and Settings\spiffed\My Documents\Arduino\Fading\applet\WInterrupts.c.o

...snip...

C:\Documents and Settings\spiffed\Desktop\arduino-0011\hardware/tools/avr/bin/avr-gcc -Os -mmcu=atmega328p -o C:\Documents and Settings\spiffed\My Documents\Arduino\Fading\applet\Fading.elf C:\Documents and Settings\spiffed\My Documents\Arduino\Fading\applet\Fading.cpp.o C:\Documents and Settings\spiffed\My Documents\Arduino\Fading\applet\core.a -LC:\Documents and Settings\spiffed\My Documents\Arduino\Fading\applet -lm

C:\Documents and Settings\spiffed\Desktop\arduino-0011\hardware/tools/avr/bin/avr-objcopy -O srec -R .eeprom C:\Documents and Settings\spiffed\My Documents\Arduino\Fading\applet\Fading.elf C:\Documents and Settings\spiffed\My Documents\Arduino\Fading\applet\Fading.rom

C:\Documents and Settings\spiffed\Desktop\arduino-0011\hardware/tools/avr/bin/avr-objcopy -O ihex -R .flash C:\Documents and Settings\spiffed\My Documents\Arduino\Fading\applet\Fading.elf C:\Documents and Settings\spiffed\My Documents\Arduino\Fading\applet\Fading.hex

Binary sketch size: 2934 bytes (of a 30720 byte maximum)


avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51
Logged

iDuino - MaxSerial - [url=http://spi

0
Offline Offline
Full Member
***
Karma: 0
Posts: 239
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

cool, now there just needs to be a mac (and linux?) version and have it hosted somewhere.
Logged

Forum Administrator
Offline Offline
Newbie
*****
Karma: 3
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

it would be good to contribute the modifications to david mellis so that it can be incorporated in the main tree

massimo
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 205
Don't Panic
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I see mouser has got them but their on order  Mfr. Part #ATMEGA328P-PU would be really great if someone can point me to a place that has them in stock...
Mouser actually doesn't have 104 pcs on order, I called sales the other day to try to order them! There answer was sometime in late August (close enough to what the on-order dialogue says though).
As discussed, Atmel was targeting Q3 to begin full production, assuming they're on track for this target (and they meant the beginning of Q3), it will be a while before we see production batches making their way into distributor's inventories and even longer until we see these orderable in hundreds-of-units let alone small quantities.
This said, several distributors have parts and pricing loaded into their databases (Digikey, Mouser, Arrow, Avnet) but none show actual stock available. You can periodically use the Atmel distributor search to look for stock in all official Atmel distributors or findchips.
Logged

iDuino - MaxSerial - [url=http://spi

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

yup just talked to mouser too, and the 104 have been sold to another client and to order the min quantity is like 350 chips and estimated lead time about 12 weeks.

Good to see some people have already been working on the Arduino IDE, perhaps both Ladaya and you can contribute your findings to the Arduino team so they can add this in the next build of Arduino.

Do any of you guys have a spare ATMega328 chip that i can buy off you smiley we wish to trial this and waiting for 12 weeks is really hard ?
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 205
Don't Panic
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

OK, rocking and rolling. After modifying the bootloader, I can now actually upload code to '328s and squash a few bugs in my IDE modification.
I've posted some tentative documentation at http://spiffie.org/know/arduino_328/.

All of this is believed to work, but I'd like to hear from someone who actually has a >14K sketch (feel free to PM me).

Obviously unless you actually have an ATmega328P in your hot little hands, there's no point in downloading the modified IDE yet, as there are bound to be bug fixes. Linux and OS X versions will come along at some point. Assuming you can install a recent avr-gcc, the 'modifications' section contains details on most other changes required.
Logged

iDuino - MaxSerial - [url=http://spi

0
Offline Offline
Newbie
*
Karma: 0
Posts: 22
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This is somewhat offtopic, but while you're modifying the bootloader please check if you can use it to upload to the eeprom section.

There's currently a bug in the bootloader that breaks uploading to the eeprom section of the 168, it would be a shame if this bug carried over to the 328.

For info, see this topic:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1202157667/15
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 205
Don't Panic
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

These are finally in stock after several months on back order.
They're available bare for $5.25 Or pre-programmed for $6.25

Currently you'll need to use the hacked Arduino 11, but I'm making very strong progress with Arduino 12 and expect to have a version out shortly.
Logged

iDuino - MaxSerial - [url=http://spi

0
Offline Offline
Full Member
***
Karma: 0
Posts: 239
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've posted a new rev of the '328p bootloader...it integrates the no-wait & no-hang features from the 'adaboot' bootloader as well as fixing the EEPROM bug (thanks ahoeben for bringing it to my attention) AND the annoying 'missing signature bytes' that crops up when using avrdude

http://www.ladyada.net/library/arduino/bootloader.html

hopefully this will be folded into the official distro, meanwhile you can program it yourself or buy preprogrammed chips
« Last Edit: October 05, 2008, 01:23:45 pm by ladyada » Logged

"The old Europe"
Offline Offline
Edison Member
*
Karma: 1
Posts: 2005
Bootloaders suck!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Any back-ports of the fixes for the 168 in the making ?
Logged

• Upload doesn't work? Do a loop-back test.
• There's absolutely NO excuse for not having an ISP!
• Your AVR needs a brain surgery? Use the online FUSE calculator.
My projects: RGB LED matrix, RGB LED ring, various ATtiny gadgets...
• Microsoft is not the answer. It is the question, and the answer is NO!

Pages: 1 [2] 3   Go Up
Jump to: