Pages: [1]   Go Down
Author Topic: Using blank ATMega 8 with UNO  (Read 1605 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I have an empty 168, without any bootloaders. I want to use it with Arduino UNO (in fact, I am going to put that 168 later to standalone circuit, but first I need to use it with uno - to program it).

I want to burn a bootloader into it. What do I have to do?
My friend has a uC programmer. I assume I should give him hex file (which one exactly), and fuses? (I'll be using ext.16MHz crystal)
Which one bootloader (optiboot-diecimilia or old one) would you recommend?

Thanks in advance
« Last Edit: March 16, 2011, 10:09:48 am by stushev » Logged

Gatineau, Qu
Offline Offline
Jr. Member
**
Karma: 1
Posts: 94
Did you Arduino today?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok let's just start over.

First you need a board with a working atmega.
Then there are 2 steps. 1- Put the boot loader on the chip (this might be done already) 2. Put the sketch on the chip.

To do the first part, load the Use Arduino as ISP sketch to the chip on the board.
Make sure you ave selected the right board and the right port.
Then connect you breadboard like this (bottom secion of this page) Circuit (targeting an AVR on a breadboard) http://arduino.cc/en/Tutorial/ArduinoISP
Like I said it only worked if I used an external clock. (I have the Uno board, with optiboot)

Then use the burn bootloader with arduino as ISP.

Now your new chip as a bootloader!

Then remove the chip from your board.

You could just pop the new chip on the board and program any sketch you would like on it.

But is you want leave the chip on the breadboard and load  a sketch on in.........do this.....

Disconnect wires to header pin 10,11,12,13 and connect pins rx and tx the the rx and tx pins on the atmega on the breadboard. Like this
http://arduino.cc/en/Tutorial/ArduinoToBreadboard  Uploading Using an Arduino Board

Then add a wire from the board socket pin 1 (reset) to the breadboard chip pin 1 (reset)

Then load the sketch you want to the chip on the breadboard.


Remember never to change the board selection............but like I said it only worked with an external clock.

Since your using a 168. After the arduino as ISP sketch is on your 328. Switch the board selection to somthing with a 168.

Better yet go to the optiboot page and dowload the optiboot for 168. Much faster the the old bootloader. (The 328 on the Uno uses a optiboot.

(The search tool is your friend, all these questions have been asked and answered before.)

If you need more help..........let us know!
« Last Edit: March 15, 2011, 12:23:58 pm by alparent » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

As that page says,

Quote
NOTE: Currently, you cannot use an Arduino Uno as an ISP programmer because the optiboot bootloader does not support this sketch. A revision for this is in progress.

Do I understand correctly, that, from your experience, it is possible to use UNO as ISP?
Logged

Gatineau, Qu
Offline Offline
Jr. Member
**
Karma: 1
Posts: 94
Did you Arduino today?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That is my experience.

I've uploaded bootloaders and sketches on both blank atmega328 and atmega8.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks!!
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Updated: I did not found atmega168 in my local store, so I purchased atmega 8.

I have done everything as it is told, tried both old and optiboot_atmega8 (http://arduino.cc/forum/index.php?topic=52873.0) bootloaders.

However, I get this:
Code:
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.

(I did not forget to select Arduino optiboot8 in IDE.)

Please help me
Logged

Gatineau, Qu
Offline Offline
Jr. Member
**
Karma: 1
Posts: 94
Did you Arduino today?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I got that when I had bad connections to my breadboard.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've checked it three times, and it is correct.

Did you add 10uF capacitor between RESET and GND to the main board? And what sketch did you use for Arduino ISP? Could you please share it?
« Last Edit: March 16, 2011, 10:29:37 am by stushev » Logged

Gatineau, Qu
Offline Offline
Jr. Member
**
Karma: 1
Posts: 94
Did you Arduino today?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No caps between RESET and GND.

And I used the Arduino as ISP sketch example included with the Arduino IDE 0022.

Can you take pictures of your setup?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
If you still have not figured this out, check this out: http://arduino.cc/en/Tutorial/ArduinoISP . I was able to program a ATMega8-16AU with a Uno Revision2 with the layout specified above.
njs552
Logged

Pages: [1]   Go Up
Jump to: