go_away

Author Topic: ATmega328 - Drop in replacement for ATmega168  (Read 17002 times)

0 Members and 1 Guest are viewing this topic.

Offline airman00Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,653
  • Helpful? 21
  • narobo.com
ATmega328 - Drop in replacement for ATmega168
« on: October 24, 2008, 11:05:05 AM »
http://www.adafruit.com/index.php?main_page=product_info&cPath=17&products_id=123   - $7.50 .

The cost is a bit high but I assume the price will become lower in the coming months.

Quote
ATmega8 - a chip with 8K of flash memory and 1K of RAM. Then AVR released the ATmega168, a drop-in replacement with 16K of flash and 1K of RAM - a really big improvement! Now there is the ATmega328 with 32K of flash and 2K of RAM. Basically its got the capacity of an ATmega32 but in a slimmer package. These chips are notable for their ability to drop-in replace the ATmega168.


Time to upgrade the $50 Robot controller ;)
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline pomprocker

  • Supreme Robot
  • *****
  • Posts: 1,430
  • Helpful? 16
  • Sorry miss, I was giving myself an oil-job.
« Last Edit: October 24, 2008, 03:30:22 PM by pomprocker »

Offline waymental

  • Jr. Member
  • **
  • Posts: 28
  • Helpful? 0
Re: ATmega328 - Drop in replacement for ATmega168
« Reply #2 on: October 25, 2008, 07:33:16 AM »
ATMEGA328P-PU-ND

$2.66 each on digikey.com

but package size of 14

Offline airman00Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,653
  • Helpful? 21
  • narobo.com
Re: ATmega328 - Drop in replacement for ATmega168
« Reply #3 on: October 25, 2008, 05:26:30 PM »
ATMEGA328P-PU-ND

$2.66 each on digikey.com

but package size of 14

its out of stock by digikey
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,666
  • Helpful? 169
    • Society of Robots
Re: ATmega328 - Drop in replacement for ATmega168
« Reply #4 on: October 27, 2008, 08:25:08 AM »
Hmmm looking at the specs . . . the only difference is twice the memory as the 168.

airman00, I remember you mentioning that you are making a product with the 168 . . . here is your chance to double your memory as a way to outdo the Arduino. ;D

Offline airman00Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,653
  • Helpful? 21
  • narobo.com
Re: ATmega328 - Drop in replacement for ATmega168
« Reply #5 on: October 27, 2008, 08:48:05 AM »
airman00, I remember you mentioning that you are making a product with the 168 . . . here is your chance to double your memory as a way to outdo the Arduino. ;D

 have a DIP socket , so I can put either the 8,168,or 328
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline pomprocker

  • Supreme Robot
  • *****
  • Posts: 1,430
  • Helpful? 16
  • Sorry miss, I was giving myself an oil-job.
Re: ATmega328 - Drop in replacement for ATmega168
« Reply #6 on: January 05, 2009, 09:12:02 PM »
got two ATmega328P's in the mail from mouser today when I got home.


Dropping them in my Roboduino, and my $50 robot board.
 ;D


Offline pomprocker

  • Supreme Robot
  • *****
  • Posts: 1,430
  • Helpful? 16
  • Sorry miss, I was giving myself an oil-job.
Re: ATmega328 - Drop in replacement for ATmega168
« Reply #7 on: January 06, 2009, 12:26:01 AM »
hmmm, what to do...it may just be late and i'm tired and i don't see something i missed:


Compiling: 50_robot_sharp_IR.c
avr-gcc -c -mmcu=atmega328p -I. -gstabs   -O0 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=50_robot_sharp_IR.lst  -std=gnu99 -Wp,-M,-MP,-MT,50_robot_sharp_IR.o,-MF,.dep/50_robot_sharp_IR.o.d 50_robo
t_sharp_IR.c -o 50_robot_sharp_IR.o

unknown MCU 'atmega328p' specified
Known MCU names:
   avr2
   at90s2313
   at90s2323
   at90s2333
   at90s2343
   attiny22
   attiny26
   at90s4414
   at90s4433
   at90s4434
   at90s8515
   at90c8534
   at90s8535
   at86rf401
   attiny261
   attiny461
   attiny861
   attiny13
   attiny2313
   attiny24
   attiny44
   attiny84
   attiny25
   attiny45
   attiny85
   avr3
   atmega103
   atmega603
   at43usb320
   at43usb355
   at76c711
   avr4
   atmega8
   atmega48
   atmega88
   atmega8515
   atmega8535
   at90pwm2
   at90pwm3
   avr5
   atmega16
   atmega161
   atmega162
   atmega163
   atmega164p
   atmega165
   atmega165p
   atmega168
   atmega169
   atmega169p
   atmega32
   atmega323
   atmega324p
   atmega325
   atmega3250
   atmega329
   atmega3290
   atmega406
   atmega64
   atmega640
   atmega644
   atmega644p
   atmega645
   atmega6450
   atmega649
   atmega6490
   atmega128
   atmega1280
   atmega1281
   at90can32
   at90can64
   at90can128
   at90usb646
   at90usb647
   at90usb1286
   at90usb1287
   at94k
   avr6
   atmega2560
   atmega2561
   avr1
   at90s1200
   attiny11
   attiny12
   attiny15
   attiny28
50_robot_sharp_IR.c:1: error: MCU 'atmega328p' supported for assembler only



I think I have to upgrade some libraries...bah i'm too tired, another day...
« Last Edit: January 06, 2009, 12:31:54 AM by pomprocker »

Offline TrickyNekro

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,207
  • Helpful? 15
  • 1.6L Peugeot 307 tuner
Re: ATmega328 - Drop in replacement for ATmega168
« Reply #8 on: January 06, 2009, 07:23:16 AM »
Hmmm looking at the specs . . . the only difference is twice the memory as the 168.

airman00, I remember you mentioning that you are making a product with the 168 . . . here is your chance to double your memory as a way to outdo the Arduino. ;D

Double flash but also double EEPROM....  :P
For whom the interrupts toll...


P.S. I've been inactive for almost a year... Don't give promises but I'll try to complete my tutorials. I'll let you know when..

Cheers!

Offline pomprocker

  • Supreme Robot
  • *****
  • Posts: 1,430
  • Helpful? 16
  • Sorry miss, I was giving myself an oil-job.
Re: ATmega328 - Drop in replacement for ATmega168
« Reply #9 on: January 06, 2009, 10:58:33 AM »
yeah i ended up upgrading my winavr last night to the december 2008 version, but then I got some other syntax errors, like it didnt recognize the registers or something

Offline Ro-Bot-X

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,431
  • Helpful? 25
  • Store: RoBotXDesigns.ca
Re: ATmega328 - Drop in replacement for ATmega168
« Reply #10 on: January 06, 2009, 06:02:21 PM »
The Arduino guys worked the kinks out and Arduino version 11 is compatible with ATmega368. You can buy the microcontroller with the bootloader uploaded from a few sites that sell Arduino stuff. Take a look at the Arduino forum, there is no reason to reinvent the wheel... (I mean struggle to solve a problem others did allready...)
Check out the uBotino robot controller!

Offline pomprocker

  • Supreme Robot
  • *****
  • Posts: 1,430
  • Helpful? 16
  • Sorry miss, I was giving myself an oil-job.
Re: ATmega328 - Drop in replacement for ATmega168
« Reply #11 on: January 06, 2009, 07:21:31 PM »
Oh but this is for AVR Studio 4

Offline Ro-Bot-X

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,431
  • Helpful? 25
  • Store: RoBotXDesigns.ca
Re: ATmega328 - Drop in replacement for ATmega168
« Reply #12 on: January 06, 2009, 08:30:08 PM »
And Arduino is based on AVR GCC... and they are using some of the avrlib... and AVRdude to program the microcontroller... So maybe, maybe it will worth a look... I looked when they were talking about it, and there is some info that may help you. I don't remember exactly what was it, and I'm sorry I don't have the time to dig it up.
Check out the uBotino robot controller!

Offline pomprocker

  • Supreme Robot
  • *****
  • Posts: 1,430
  • Helpful? 16
  • Sorry miss, I was giving myself an oil-job.
Re: ATmega328 - Drop in replacement for ATmega168
« Reply #13 on: January 08, 2009, 12:13:20 AM »
Gettin these errors now after updating the winavr to 20081205, at least it recognized the mcu now.  all UART errors. Would the 328 have different register names?


Compiling: uart.c
avr-gcc -c -mmcu=atmega328p -I. -gstabs   -O0 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=uart.lst  -std=gnu99 -Wp,-M,-MP,-MT,uart.o,-MF,.dep/uart.o.d uart.c -o uart.o
uart.c: In function 'uartInit':
uart.c:52: error: 'UCR' undeclared (first use in this function)
uart.c:52: error: (Each undeclared identifier is reported only once
uart.c:52: error: for each function it appears in.)
uart.c:52: error: 'RXCIE' undeclared (first use in this function)
uart.c:52: error: 'TXCIE' undeclared (first use in this function)
uart.c:52: error: 'RXEN' undeclared (first use in this function)
uart.c:52: error: 'TXEN' undeclared (first use in this function)
uart.c: In function 'uartSetBaudRate':
uart.c:93: error: 'UBRRL' undeclared (first use in this function)
uart.c: In function 'uartSendByte':
uart.c:119: error: 'UDR' undeclared (first use in this function)
uart.c: At top level:
uart.c:230: warning: 'SIG_UART_TRANS' appears to be a misspelled signal handler
uart.c: In function 'SIG_UART_TRANS':
uart.c:239: error: 'UDR' undeclared (first use in this function)
uart.c: At top level:
uart.c:258: warning: 'SIG_UART_RECV' appears to be a misspelled signal handler
uart.c: In function 'SIG_UART_RECV':
uart.c:263: error: 'UDR' undeclared (first use in this function)
make: *** [uart.o] Error 1
Build failed with 11 errors and 3 warnings...


 


Get Your Ad Here