use arduino to program ATMEGA168 - Page 1
Forum section: electronics / beginners

author: christos
author_rank: Regular Contributor
timestamp: August 09, 2014, 09:16:25 am
content: i have the arduino uno rev 3 and i would like to program some ATMEGA168...can i just remove the chip and place the new one and program it to?use it like a chip programmer

author: rob77
author_rank: Super Contributor
timestamp: August 09, 2014, 09:21:38 am
content: you need to load one arduino with the ISP programmer sketch and use is as a programmer for the other atmega.the ISP programmer sketch is included in the arduino software and it's documented on the arduino page.or just google itlot of related stuff over there

author: Psi
author_rank: Super Contributor
timestamp: August 09, 2014, 09:26:31 am
content: Be aware that the letter P means the chip is a slightly different version and may have a different signature when programming.Check if you have ATMEGA168P or ATMEGA168.Pinouts and functionality are the same, so both will work. The difference is to do with power consumption and other electrical parameters.

author: christos
author_rank: Regular Contributor
timestamp: August 09, 2014, 09:26:56 am
content: thx

author: christos
author_rank: Regular Contributor
timestamp: August 09, 2014, 09:29:16 am
content: http://arduino.cc/en/Hacking/Programmervery easy to do...so if i do this i will be able to program multiple chips (same chips)?thx

author: christos
author_rank: Regular Contributor
timestamp: August 09, 2014, 09:31:22 am
content: does the chip itself have the bootloader in it ?

author: rs20
author_rank: Super Contributor
timestamp: August 09, 2014, 09:54:53 am
content: You need to ask more unambiguous questions.Quote from: christos on August 09, 2014, 09:29:16 amOnce you have a programmer, you can program a whole variety of chips. Typically, if you have a single PCB with multiple microcontrollers (which is sort of unusual to be honest), each microcontroller will have its own ISP header*; if you want to program chip X, plug your programming into header X. If you want tosimultaneouslyprogram several different chips withthe same programmer, that seems possible in principle but let's leave that for later.* If you use JTAG instead of ISP to program, there are ways to program multiple chips through a single header, but that's not relevant while you're working with ISP.Quote from: christos on August 09, 2014, 09:31:22 amDo you mean "do brand new AVR chips have the Arduino bootloader (or any bootloader) installed by default?"? The answer is no, the chips will not have the Arduino bootloader installed. But if you're programming with ISP, you don't need any bootloader, so don't worry about this. The Arduino bootloader is only there to accept a program from the USB line via a fairly ugly hack. You'll be sending the program via ISP, which requires no bootloader at all, so you're fine.

author: ion
author_rank: Regular Contributor
timestamp: August 09, 2014, 10:24:49 am
content: Quote from: christos on August 09, 2014, 09:29:16 amThat link is for using a dedicated programmer. I think this might be more like what you were asking about:http://arduino.cc/en/Tutorial/ArduinoISPYou can skip the last step - as rs20 wrote - you don't need a bootloader on the target chip.

author: Bryan
author_rank: Frequent Contributor
timestamp: August 09, 2014, 10:57:55 am
content: This works well.https://www.tindie.com/products/jeffmurchison/arduinoisp-deluxe-shield-kit/

author: christos
author_rank: Regular Contributor
timestamp: August 09, 2014, 11:12:18 am
content: thx all

author: rs20
author_rank: Super Contributor
timestamp: August 09, 2014, 11:12:31 am
content: Quote from: Bryan on August 09, 2014, 10:57:55 amYikes, $25? Why not just get an actual programmer without the need for all those fiddly DIP switches and a spare Arduino?