ATmega328 in Ice Tube

For RTC breakouts, etc., use the Other Products from Adafruit forum

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
jpkelly
 
Posts: 47
Joined: Sun Sep 20, 2009 4:09 am

ATmega328 in Ice Tube

Post by jpkelly »

I am trying to put an ATmega328 in my Ice Tube but I cant seem to program it. I am using a USBtinyISP. I cant seem to get the ISP to recognize the ATmega328

Code: Select all

avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
avrdude: Expected signature for ATMEGA328P is 1E 95 0F
I have been able to get the ISP to recognize a ATMEGA168 using a -B 32 flag like this:

Code: Select all

avrdude -c usbtiny -p m168  -B 32  -U flash:w:iv.hex

User avatar
jpkelly
 
Posts: 47
Joined: Sun Sep 20, 2009 4:09 am

Re: ATmega328 in Ice Tube

Post by jpkelly »

I ended up using a ATmega168 and was able to fit the code.
I used an old Diecimila and USBtinyISP to program the chip. Programming while on the clock board was not working very well.

User avatar
jpkelly
 
Posts: 47
Joined: Sun Sep 20, 2009 4:09 am

Re: ATmega328 in Ice Tube

Post by jpkelly »

I am still curious if anyone has any tips on using a 328 in an Ice Tube.

User avatar
MikeHg
 
Posts: 22
Joined: Mon Oct 13, 2014 1:18 am

Re: ATmega328 in Ice Tube

Post by MikeHg »

Hi jpkelly,

I programmed my ATmega328p externally using an Arduino Uno and jarchie's firmware. I followed the guide inside the zip-Files and it worked without any problems.

Regards,
Mike

User avatar
jarchie
 
Posts: 615
Joined: Sun Jun 24, 2012 2:16 pm

Re: ATmega328 in Ice Tube

Post by jarchie »

Are you dealing with the ATmega328 or the ATmega328p (the latter is more common, but sometimes people order the former from a parts supplier by mistake). The difference between the chips is that the 328p has support for Atmel's picoPower power-saving features. ...and to make things even more confusing, a lot of people talk about the ATmega328--or simply "the 328"--when they are referring to the ATmega328p!

I second MikeHg's advice to try programming in a development board such as the Arduino Uno. A development board can sometimes work when ISP fails for the clock itself--especially when the ATmega328's fuses (or ATmega328p's fuses) are set to rely upon an external oscillator.

By the way, I wrote the xmas firmware mentioned by MikeHg, and it uses the picoPower features to increase clock battery life. So if you are really using the 328 and not the 328p, the sleep functionality might not work properly with my firmware.

Here is a good thread on porting firmware to the 328p and it also applies to the 328: http://forums.adafruit.com/viewtopic.php?p=164574 (It isn't firmware specific.)

Locked
Please be positive and constructive with your questions and comments.

Return to “Clock Kits (discontinued)”