Grand Blanc, MI, USA
Offline
Edison Member
Karma: 43
Posts: 2498
"We're a proud service of the Lost Electricity Reclamation Agency"
|
 |
« Reply #15 on: April 25, 2011, 06:11:11 pm » |
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! 
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Dallas
Offline
Shannon Member
Karma: 118
Posts: 10153
|
 |
« Reply #16 on: April 25, 2011, 06:19:11 pm » |
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? So maybe not a bad chip. Certainly does not seem to be. 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. Maybe timing is different? The baud rate is different. 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
Edison Member
Karma: 43
Posts: 2498
"We're a proud service of the Lost Electricity Reclamation Agency"
|
 |
« Reply #17 on: April 25, 2011, 06:28:53 pm » |
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. It's good to know the life of an AVR processor has been spared!
Indeed! 
|
|
|
|
|
Logged
|
|
|
|
|
Grand Blanc, MI, USA
Offline
Edison Member
Karma: 43
Posts: 2498
"We're a proud service of the Lost Electricity Reclamation Agency"
|
 |
« Reply #18 on: April 25, 2011, 07:06:45 pm » |
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
|
|
|
|
|
Portugal
Offline
God Member
Karma: 5
Posts: 962
|
 |
« Reply #19 on: April 25, 2011, 07:32:46 pm » |
Auto-reset not working as it should?
|
|
|
|
|
Logged
|
|
|
|
|
Grand Blanc, MI, USA
Offline
Edison Member
Karma: 43
Posts: 2498
"We're a proud service of the Lost Electricity Reclamation Agency"
|
 |
« Reply #20 on: April 25, 2011, 07:36:46 pm » |
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
|
|
|
|
|
Global Moderator
Dallas
Offline
Shannon Member
Karma: 118
Posts: 10153
|
 |
« Reply #21 on: April 26, 2011, 06:51:24 pm » |
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
Edison Member
Karma: 43
Posts: 2498
"We're a proud service of the Lost Electricity Reclamation Agency"
|
 |
« Reply #22 on: April 26, 2011, 07:07:55 pm » |
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) 
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Dallas
Offline
Shannon Member
Karma: 118
Posts: 10153
|
 |
« Reply #23 on: April 26, 2011, 07:16:15 pm » |
Which FTDI adapter are you using?
|
|
|
|
|
Logged
|
|
|
|
|
Grand Blanc, MI, USA
Offline
Edison Member
Karma: 43
Posts: 2498
"We're a proud service of the Lost Electricity Reclamation Agency"
|
 |
« Reply #24 on: April 26, 2011, 07:21:50 pm » |
Have tried both the Adafruit FTDI Friend and the Sparkfun FTDI Basic. Same results with either.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Dallas
Offline
Shannon Member
Karma: 118
Posts: 10153
|
 |
« Reply #25 on: April 26, 2011, 09:43:45 pm » |
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
Edison Member
Karma: 43
Posts: 2498
"We're a proud service of the Lost Electricity Reclamation Agency"
|
 |
« Reply #26 on: April 26, 2011, 10:00:38 pm » |
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
|
|
|
|
|
Global Moderator
Dallas
Offline
Shannon Member
Karma: 118
Posts: 10153
|
 |
« Reply #27 on: April 26, 2011, 10:13:28 pm » |
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
Edison Member
Karma: 43
Posts: 2498
"We're a proud service of the Lost Electricity Reclamation Agency"
|
 |
« Reply #28 on: April 26, 2011, 10:20:56 pm » |
LOL, no worries, it was quick and painless enough. Thanks for your help, I certainly do appreciate your attention to this puzzler!
|
|
|
|
|
Logged
|
|
|
|
|
|