Pages: [1] 2   Go Down
Author Topic: Bootloading atmega 168A-PU  (Read 2757 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hello,
 I am trying to boatload my atmega 168A-PU using arduino as ISP like this method -     http://arduino.cc/en/Tutorial/ArduinoToBreadboard   . i have an Atmega 328P-PU chip on my arduino board. 
 
further in the arduino IDE i have selected the board as -Arduino Duemilanove or Nano w/ ATmega328. i am able to upload the AVRISP sketch on to the arduino board... further when i try to burn bootloader on to my atmega 168 chip i get the error message

                    " avrdude: Expected signature for ATMEGA328P is 1E 95 0F
         Double check chip, or use -F to override this check.   ". how do i go about this?
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 176
Posts: 12283
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Select a 168 based board and then try to burn a bootloader.
Logged

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

ok ill try.. do i need to upload the avrisp sketch if i change my board option?
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 176
Posts: 12283
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Once the ArduinoISP sketch is uploaded and auto-reset is disabled you do not need to re-upload the sketch for any reason.
Logged

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

OK .. as said i have added a 120 ohm resistor between the reset pin and the 5 v supply.. i have selected the board as atmega nano/atmega 328... i uploaded the avrisp sketch. then i selected my board as - arduino diceimela ,Nano w /Atmega 168, and
selected burn bootloader>arduino as isp.

 i get the following error message
  " avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x11
avrdude: stk500_cmd(): programmer is out of sync   "
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 176
Posts: 12283
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
as said i have added a 120 ohm resistor between the reset pin and the 5 v supply.. i have selected the board as atmega nano/atmega 328... i uploaded the avrisp sketch

Wrong order.  Ensure the 120 ohm resistor is not connected.  Select the board you will use as a programmer.  Upload the ArduinoISP sketch.  Connect the 120 ohm resistor between +5V and RESET.  The board will now function as a programmer.

In addition, you will be well served by connecting an LED (with series resistor) to pin 9.  A "heartbeat" should be present.
Logged

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

i did not get the heartbeat pattern.. i got this error

         "avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check."
Logged

Sevilla City
Offline Offline
Newbie
*
Karma: 0
Posts: 13
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

try to add the 168P signature to avrdude.txt, or modify the actual Atmega168 data

#------------------------------------------------------------
# ATmega168
#------------------------------------------------------------

part
    id              = "m168";
    desc            = "ATMEGA168";
     has_debugwire = yes;
     flash_instr   = 0xB6, 0x01, 0x11;
     eeprom_instr  = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
                     0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
                     0x99, 0xF9, 0xBB, 0xAF;
    stk500_devcode  = 0x86;
    # avr910_devcode = 0x;
    signature       = 0x1e 0x94 0x06;
...

to

    signature       = 0x1e 0x94 0x0b;


i did not get the heartbeat pattern.. i got this error

         "avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check."
Logged


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

the signature of my atmega 328 ( which is on my main arduino board) is 0x1e 0x95 0x0F.. and the signature of my atmega 168 ( the one to be bootloaded is 0x1e 0x94 0x0b .
 the error message shows up
   "avrdude: Expected signature for ATMEGA328P is 1E 95 0F
         Double check chip, or use -F to override this check."
Logged

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

can there be any problem with the microcontroller? what else can i try to do?
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 176
Posts: 12283
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
i did not get the heartbeat pattern..

Re-upload the ArduinoISP sketch.  If the heartbeat is not present, the ArduinoISP sketch is not running.
Logged

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

ok .. i have selected my board as  Arduino Duemilanove w/ atmega328. uploaded the avrisp sketch. (Done uploading).
then i connect the 120 ohm resistor between the reset and 5v pins.  then i go to burn bootloader..to boot-load my atmega168 chip. it shows -

  "avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check."
Logged

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

i am using Ubuntu does that make any difference..??
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 176
Posts: 12283
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


I suggested connecting an LED to pin 9.  Did you do that?  Does it display a heartbeat?  Does the heartbeat ever stop?
Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 106
Posts: 6373
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
the signature of my atmega 168 ( the one to be bootloaded is 0x1e 0x94 0x0b .
 the error message shows up:   "avrdude: Expected signature for ATMEGA328P is 1E 95 0F
If you're trying to burn a bootloader in a 168, and you're getting an error message that it's "expecting" a 328 signature, that means you didn't select the right "board" in the boards menu before you clicked the "burn bootloader" button.
The sequence should be:  select "nano with 328", upload Arduino ISP, disable auto-reset, connect 168 board or chip, select (one of) the 168-based boards, "burn bootloader."
Logged

Pages: [1] 2   Go Up
Jump to: