Friday 23 June 2017

avr - Arduino Bootloader


If I upgrade my arduino from the ATMega 168 to ATMega 328 will I be able to use the ATMega 168 like a stock chip from the factory or will the bootloader prohibit this? In other words, will I be able to overwrite the bootloader, with my usbtiny ISP programmer, on the 168 to use as a Atmel stock chip with Avrdude? Is there any special steps I would need to take like reseting fuses?



Answer



Yes, you can reprogram the chip. I did the same when I upgraded my Arduino from a 168 to a 328 two weeks ago. The chip works great in another application.


Take note, of course, that you may need to change fuses depending on what kind of board you had and what kind of board you are moving it to. The most common, I would imagine (and the ones I had to reset) dealt with changing to the internal oscillator and setting dividers instead of using an external crystal. There is no comprehensive list of fuse changes, though, because it depends on what kind of circuit you're moving the chip to. YMMV.


--Edit-- As JohnC said, yes, reprogramming of fuses should be done BEFORE you remove it from the Arduino. Since the Arduino is fused to use an external oscillator, the chip will not do a darn thing if placed on a board without an oscillator.


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...