Flashing roms

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
Kavett
 
Posts: 3
Joined: Mon Feb 25, 2013 4:51 pm

Flashing roms

Post by Kavett »

So I've tried searching for a related post and i'm not too sure where to post this. I chose clocks because that's what i'm trying to flash. I downloaded BANNED's clock pack but I have no idea how to use it. I tried using arduino 1.0.4 but it wont recognize any of the files to edit them (fonttable.h, iv.c, iv.h, ivbin.hex, iveep.hex, makefile, timedef.pl, util.c and util.h). From adafruit's arduino tutorial it looks like the .h files are libraries but I'm afraid that's where my understanding fails =(. If this belongs in arduino then I apologize for the wrong forum.

I'm trying to program on a arduino duemilanove with an ATMEGA328P-PU thanks party people :)

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

Re: Flashing roms

Post by jarchie »

Okay... I'm sorry, but I'm very confused. What exactly would you like to do?

Given the file names you mention, it looks like you're trying to upload an alternative firmware for the Ice Tube Clock. But your last sentence says that you're trying to program an Arduino Duemilanove.

Since the only other post you've made on this form was in regard to the Ice Tube Clock, maybe you're trying to use a Duemilanove to program the Ice Tube Clock?

Anyhow, I'd like to help, but I can't figure out what you're trying to do...

Kavett
 
Posts: 3
Joined: Mon Feb 25, 2013 4:51 pm

Re: Flashing roms

Post by Kavett »

I'm trying to flash BANNED's ROM onto my clock but it seems that i've got my programmers confused. it looks like i need to use AVR to flash firmware. i was originally thinking that it was programmed on arduino & through arduino and then put into the chip holder on the clock. that was where i was mistaken. So i guess i should revise my question & ask: can i flash, via arduino, roms onto a 328P chip on the duemilanova and put it in the clock?

Thanks for the help and patience! i can see that you're really active on the forums here, Jarchie, thanks for the help via other's posts =).

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

Re: Flashing roms

Post by jarchie »

it looks like i need to use AVR to flash firmware.
Correct. You'll need avr-gcc to compile the firmware and avrdude to upload the firmware. These are free, open-source command line tools, and how to install them will depend on your operating system.
can i flash, via arduino, roms onto a 328P chip on the duemilanova and put it in the clock?
The Ice Tube Clock has a 6-pin (2x3) ISP header (In System Programming header). Most people buy a dedicated programmer such as the Adafruit USBtinyISP which connects the ISP header to your computer and allows programming. But it's also possible to turn your Arduino into a programmer by uploading the ArduinoISP sketch (check the example sketches in the Arduino IDE), disabling the auto-reset, and connecting the Arduino to the clock's ISP headers with jumpers.

If this is something that interests you, it would help me to know two other things: What operating system are you running? And does the 328P you'd like to program already have an Arduino bootloader?

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

Re: Flashing roms

Post by jarchie »

I recently needed to program an Ice Tube Clock with a DC Boarduino and thought a photo of that setup might be helpful. On the software side, I programmed the clock under Mac OS X with MacPorts' avr-gcc and avrdude packages. But I've also used Windows with WinAVR and Ubuntu Linux with the avr-gcc and avrdude packages. Compiling alternative firmwares is discussed in another thread.

After loading the ArduinoISP sketch to the Boarduino, the automatic reset needed to be temporally disabled by pulling up the Arduino reset pin to +5 volts with a 120 ohm resistor. Note that the exact method for disabling the automatic reset will depend on the particular Arduino board. The ArduinoISP sketch is included with the example sketches in the Arduino IDE.

As shown in the attached photo, the main clock board is connected to external power, and the Boarduino is connected as follows:
  • Arduino ground to ISP GND (black wire)
  • Arduino digital 10 to ISP RST (green wire)
  • Arduino digital 11 to ISP MOSI (yellow wire)
  • Arduino digital 12 to ISP MISO (pink wire)
  • Arduino digital 13 to ISP SCK (purple wire)
Finally, I set fuses, uploaded new firmware, and set lock bits with avrdude:

Code: Select all

% avrdude -b 19200 -P /dev/tty.usbserial-A100S69A -c arduino -p atmega328p \
          -u -U lfuse:w:0x62:m -u -U hfuse:w:0xD1:m -u -U efuse:w:0x06:m

% avrdude -b 19200 -P /dev/tty.usbserial-A100S69A -c arduino -p atmega328p \
          -U flash:w:icetube_flash.hex:i -U eeprom:w:icetube_eeprom.hex:i

% avrdude -b 19200 -P /dev/tty.usbserial-A100S69A -c arduino -p atmega328p \
          -U lock:w:0x2B:m
Hope that helps!
Attachments
Programming the Ice Tube Clock with a DC Boarduino
Programming the Ice Tube Clock with a DC Boarduino
arduino-programmer.jpg (238.85 KiB) Viewed 815 times

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

Return to “Clock Kits (discontinued)”