Any kind soul point me in the direction of some training links on this?
I bought some ATMega 168 20PU chips for a couple of pounds, would like to load sketches onto them for a barebones small project.
I don't know anything about bootloaders, should I? I understand the process of breadboarding voltage regulators clock and caps etc, but the process of loading a sketch is the thing I don't fully understand.
I built a Mintduino recently and it's working fine (thanks to the duffers guide to assembling it, that and the fact the chip (328) was ready to FTDI friend a sketch onto it.)
Thx in adv. McP
Covers both installing a bootloader, and loading a sketch with USB/Serial adapter.
Hi, you will also more than likely need the core file for that chip since it I don't believe it is supported natively by the Arduino IDE"
Support file can be downloaded from here...
There are two ways to program an ATMEGA :using a bootloader (which requires a USB to serial module, which can be bought from eBay, make sure you get a model that provides the DTR signal for the reset line).
The other approach is to program the ATMEGA168 via the ISP method (In Serial Programming).
The link provided by CrossRoads covers both.
For the iSP approach, you will either require an Arduino board (like the Uno) or a programmer which a 6-pin or a 10-pin connector. The USBASP or USBISP programmer are popular and are recommended ....
I hope it helps !!!
Well, he would obviously need the USBASP (or equivalent) to load the bootloader anyway, wouldn't he? So he needs it no matter what.
can't the bootloader be programmed with a spare Uno, following Nick Gammon's procedure?
(Gammon Forum : Electronics : Microprocessors : How to make an Arduino-compatible minimal board)
A spare Uno would allow him to burn the bootloader and it's definitely a nice item to have around!
I'd say it's definitely good to have both items around ....
Thanks for all the replies, The most helpful (for a duffer like me) was the one from Crossroads.
I'll attempt that, can anyone confirm that this set of instructions can be adapted to use a duemilenove board and a 168 chip? I'll try it anyway but wondered.
The Duemilanove is a UNO, just an earlier version with a different USB chip and a slightly different bootloader - unless as most people do, you put the UNO bootloader on it, in which case it is for the most part indistinguishable from a UNO. There would be even be a version of the UNO bootloader for a 168 if that is the even earlier version of the Duemilanove you have, but that is probably not worth the trouble.
So - just use it. You have to tell the IDE what it is when you upload the "Arduino as ISP" sketch, but to then upload the bootloader using that sketch, you tell the IDE what the target chip is.
you will also more than likely need the core file for that chip since it I don't believe it is supported natively by the Arduino IDE
the ATmega168 IS supported natively by the Arduino IDE. This is what Arduinos had before the 328 was widely available. Just set the board type to "diecimila" and (on 1.6.x) the processor to "Atmega168."
the ATmega168 is essentially identical to the ATmega328, EXCEPT for having less memory.