Pages: [1]   Go Down
Author Topic: Need help loading sketch on atmega48 using Arduino Uno as ISP.  (Read 2683 times)
0 Members and 1 Guest are viewing this topic.
Gatineau, Qu
Offline Offline
Jr. Member
**
Karma: 1
Posts: 94
Did you Arduino today?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I tried loading the blink sketch to an atmega48 using my Uno as ISP.
I've installed Mark S  extras from http://www.avr-developers.com/
I've setup the atmega48 on a breadboard with a 16mhz resonator.
But I keep getting this error message:

avrdude: Expected signature for ATMEGA48 is 1E 92 05
             Double check chip, or use -F to override this check.

Any help would be very much appreciated.
Logged

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

Disable auto-reset on the Uno.
Logged

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

With a 10uF cap between GND and RESET? The - of the cap to GND.  Tried that!  smiley-sad
Logged

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

The error message includes the actual signature of the processor that responded.  What was the value?
Logged

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

Quote
1E 92 05
That's an ATmega48A, which has a different signature for some reason.
You should change your compile and download to specify the A version.  (If it's not supported by one or the other, it's probably OK to use the override switch in this case...)
Logged

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

What do I need to do to change that signature?
Change something in the board.txt? or recompile something (witch I'm not setup to do!  smiley-sad)

 
Logged

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

You're not using avrdude by itself, even though you're skipping the bootloader?  Hmm.  It might work if you change your boards.txt from:
atmega48.name=Arduino Atmega48

atmega.upload.protocol=stk500
atmega48.upload.maximum_size=4096
atmega48.upload.speed=19200

atmega48.bootloader.low_fuses=0xff
atmega48.bootloader.high_fuses=0xdd
atmega48.bootloader.extended_fuses=0x00
atmega48.bootloader.path=atmega
atmega48.bootloader.file=ATmegaBOOT_168_diecimila.hex
atmega48.bootloader.unlock_bits=0x3F
atmega48.bootloader.lock_bits=0x0F

atmega48.build.mcu=atmega48
atmega48.build.f_cpu=16000000L
atmega48.build.core=arduino


to

atmega48.name=Arduino Atmega48a

atmega.upload.protocol=stk500
atmega48.upload.maximum_size=4096
atmega48.upload.speed=19200

atmega48.bootloader.low_fuses=0xff
atmega48.bootloader.high_fuses=0xdd
atmega48.bootloader.extended_fuses=0x00
atmega48.bootloader.path=atmega
atmega48.bootloader.file=ATmegaBOOT_168_diecimila.hex
atmega48.bootloader.unlock_bits=0x3F
atmega48.bootloader.lock_bits=0x0F

atmega48.build.mcu=atmega48a
atmega48.build.f_cpu=16000000L
atmega48.build.core=arduino

Logged

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

I've never used avrdude by itself. Don't mind trying it....but I don't have any programmer other the mu Arduino board (Arduino as ISP).
Would avrdude support Arduino as ISP as a programmer?

Thanks for all the the help westfw.....for this and all the other problems I had before.
Logged

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

Ok now that I'm back home.....I've check my chip and it's an atmega48PA
It's signature is: 1e 92 0a
What and where do I need to change to make this signature change?
Logged

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

OK I've manage to get past the signature error by changing the signature in the avrdude.conf file.
Avrdude tells me that the upload is successful, but I get no blinking?

Maybe just changing the signature is not enough? Maybe something more is needed?

There as to be a way to get this working!
Logged

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

Quote
but I get no blinking?

Blinking from a Sketch you uploaded or blinking from the bootloader?
Logged

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

From the blink sketch after it's supposedly on the chip.
Logged

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


Is it blinking very slowly or not at all?  Try dividing the delay between blinks by 10.

Did you change the processor fuses to use a external resonator?
Logged

Pages: [1]   Go Up
Jump to: