Pages: 1 [2]   Go Down
Author Topic: Can an MCU be partly bad?  (Read 3567 times)
0 Members and 1 Guest are viewing this topic.
Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4063
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Interesting, the Arduino Duemilanove or Nano w/ ATmega328 bootloader works like a champ!  So maybe not a bad chip.  I don't know anything about the bootloader internals, to be able to guess why the one works and not the other.  Maybe the Optiboot loader should only be used with the Uno (because of the ATmega8U2 interface)?  Maybe timing is different?  I've used the Optiboot successfully in several non-Uno instances, but maybe I've just been lucky up until now.

Appreciate the suggestions and interaction, it kept me going.  Very nearly chucked the chip, but now I'm glad I didn't, might have learned something in addition to saving the chip.  I think I have one more raw chip, will have to try with that one.  That'd be my luck, toss the one, and then the next one I try does the same thing! smiley
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

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

Interesting, the Arduino Duemilanove or Nano w/ ATmega328 bootloader works like a champ!

I suspect it's too late now but when you tried using the processor with the Uno / Optiboot bootloader did you remember to select Arduino Uno?

Quote
So maybe not a bad chip.

Certainly does not seem to be.

Quote
Maybe the Optiboot loader should only be used with the Uno (because of the ATmega8U2 interface)?

Nope.  The bootlaoder has no awareness of what's on the other side of the serial port.  It's all just bytes coming and going through the serial port.

Quote
Maybe timing is different?

The baud rate is different.

Quote
I've used the Optiboot successfully in several non-Uno instances, but maybe I've just been lucky up until now.

I'd say unlucky this time.  Unless you have stumbled on a bug, Optiboot should work fine.

It's good to know the life of an AVR processor has been spared!
Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4063
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I suspect it's too late now but when you tried using the processor with the Uno / Optiboot bootloader did you remember to select Arduino Uno?

I do believe I did.  Actually probably not too late, I'd bet I could recreate the situation.

Quote
It's good to know the life of an AVR processor has been spared!

Indeed!  smiley-cool
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4063
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Reprogrammed my chip with the Optiboot loader, and indeed I still cannot upload to it.  Without doing anything else, I took it and put it onto a real Uno board, and uploads work fine.  Took the chip from the Uno board (heretofore untouched) and put it on my breadboard and it works fine there too.  Curiouser and Curiouser.  Maybe the one chip is marginal in some way, and Optiboot brings out the worst in it, at least when trying to upload to it with an FTDI interface.
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Portugal
Offline Offline
God Member
*****
Karma: 6
Posts: 962
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Auto-reset not working as it should?
Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4063
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Auto-reset not working as it should?

Looks like it is, from the LED on PB5, and I've also tried hitting the reset switch.
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

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


Just to clarify ...

You have two (or more) ATmega328 processors.

At some point, you have installed Optiboot to two (or more) of these processors.

You have one processor that does not work with the bootloader but does work using ICSP.

The other processor(s) work correctly using the bootloader.

The processor that does not work does not work when installed in an Uno board and does not work using an FTDI board.

Is that correct?
Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4063
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, except for the last which should read:

The processor that does not work does work when installed in an Uno board and does not work using an FTDI board.  (But does work with FTDI and the ATmegaBOOT_168_atmega328.hex bootloader!)

No shotgunning here (sorry)  smiley-confuse
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

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


Which FTDI adapter are you using?
Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4063
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Have tried both the Adafruit FTDI Friend and the Sparkfun FTDI Basic.  Same results with either.
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

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

One last test and then I'm out of ideas.  Locate "boards.txt" (it's in the {ArduinoRoot}\hardware\arduino directory).  Open "boards.txt" in your favourite text editor.  Locate the "Arduino Uno" section; it should be first.  Change "uno.upload.speed" to 117647.  The line should look like this...

 uno.upload.speed=117647

Save and close the file.  Test.  Don't forget to change the baud rate back to 115200.
Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4063
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

When uploading, after the compile, I immediately get:
avrdude: serial_baud_lookup(): unknown baud rate: 117647

What is the significance of the number 117647?
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

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


Rats.  I can't imagine why avrdude would filter the baud rate but it does so we're done.

117647 is the actual baud rate at the processor.  The formula is F_CPU / (8*(UBRR0+1)) = 16000000 / (8*(16+1)).

Oh, wait.  That was a dumb test.  You already did an echo test.
Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4063
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

LOL, no worries, it was quick and painless enough.  Thanks for your help, I certainly do appreciate your attention to this puzzler!
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Pages: 1 [2]   Go Up
Jump to: