I have an arduino unu (pre-made) with the atmega328 and an atmega168. I am wanting to make a second arduino out of the 168. I don't have a USB programmer. The chip came out of some servo contorller board so I am guessing the arduino bootloader is not already installed. Is it possible to program with my uno, and if so how? Connection to the arduino instead of the computer when sending sketches is fine as long as I can disconnect it from the uno for use.
You can use an Arduino as a programmer for other chips. The sketch is called "ArduinoISP".
Basically, you power the target processor and connect to its in circuit programming programming pins.
For a AtMega168 select the board type of "Arduino Diecimila or Duemilanove w/ ATmega168" as the target.
Here is one important tip. You have to disable the auto-reset of the programmer that occurs when the serial port is opened. Do this right before you select "Burn BootLoader" in the IDE. I have seen putting a specific pullup value on it as well as a big cap on the reset line. I had a breadboard Arduino so I just disconnected the reset line.
You need to program it with the corresponding version of bootloader to match the 168 or 328 chips. The IDE will select the corresponding bootloader as specified per the
If you program using the ISCP then for a UNO it would get
where the 168 would use
in the same directory.
You may also wish to use other compatible bootloaders such as optiboot
i'm posting this incase there's somebody who'd be as desperate as i am to get an old s3v3 to work using an arduino uno hooked up to a pc. been at this thing for months, and just can't imagine how frustrating it was. my main objective was to bootload the old s3v3 with a new uno i had for a few months, then upload a blink sketch. i basically followed the steps from these two sites over and over. apparently the board selection just made all this work, and i think my s3v3 had a corrupted bootloader or something.
uno === s3v3
5v === 5v
gnd --- gnd
d10 --- reset
d11 --- d11
d12 --- d12
d13 --- d13
procedures; (im using arduino ide 1.0.1)
-load the arduinoISP program from samples into the uno.
-after loading the arduinoISP sketch, set this:
tools > programmer > arduino as isp
tools > board > arduino nano w/ atmega168. <---this was a eureka moment.
-then click on tools > burn bootloader
-after the bootload is done, open the target sketch,
-setup some kind of indicator, like blink, etc. (i setup a blink function on pin 9, so i'd know the upload worked.)
-click on file > upload using programmer.
I've tried numerous troubleshootings from various sites, including the tip to put the uno board's reset to low using a ceramic cap, nothing just worked. i was almost giving up into buying another board, until the setting just worked. 0_o
There is an easier way to do this. I just have bootloaded atmega 168-20PU with arduino uno. I used old IDE Ver1.05. I tryed to bootload it with Tools/Board>Uno, and it gave a Yikes!Invalid device signature, and so i started with different board settings going from Arduino BT w/ ATmega168, and it did not worked, then to Arduino Mini w/ ATmega 168, and finally the one that worked for me was Decimila od Duemilanove w/ATmega168. Bootloaded successfully.
Invalid device signature: change the Device Signature in the "...\arduino-1.8.5\hardware\tools\avr\etc\avrdude.conf". Search for "168" and change the last"0x06" in a "0x0b" in the signature line "signature = 0x1e 0x94 0x06". After this procedure I was able to burn the bootloader and writing sketches into my ATmega168P by using "Duemilanove/Diecimila" as target.
To show the expected signature vs. the right signature during upload goto File -> Preferences and set check box "verbose output during upload".