Go Down

Topic: Speed slow, what to do? (Read 492 times) previous topic - next topic

godo

Hi there,
I built a Sanguino clone (see my other posts). Two boards work fine, I burned the bootloader via usbtinyISP. I could upload sketches with a 2009 and have them running nicely.
Two recently finished boards behave strange: I burned the bootloader as above, but they do not communicate via USB and Duemilanove, and I did a loop test, which passed without problems. I checked the pins for connections to the outbreak pins, no problem.
Then I burned a hex-file from my sketch right via usbtinyISP. Now my program starts, but around 10 times slower than normal.
What happened? Do I have to check the 16MHz crystal?
Any help is apprechiated, thanks in advance
Sebastian

johnwasser

Factory chips run at 1 MHz (8 MHz internal RC clock and prescale defaulting to 8).  Sounds like you didn't set the fuses for the external 16 MHz crystal and default prescale of 1.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

godo

#2
Mar 05, 2012, 07:37 pm Last Edit: Mar 05, 2012, 09:17 pm by godo Reason: 1
Thanks John, sounds good. I hope I find some instructions about that. Thanks.

[hours later] Sorry, but shouldn't the bootloader already set the fuses to the correct speed? Or why is the frequency in the boards descriptions?

godo

[Much more frustrating hours later] Allright, it runs fast now after I learned how to set the fuses and after repeating that a couple of times it worked (the hex uploaded via USBtinyISP). I still cannot communicate via serial, so it was no speed issue. Any ideas? Thank you!

godo

Solved.
In the end I used the Arduino IDE 022 with the USBtinyISP. I pretended the board to be a Duino 644P and deleted the .hex extension on a renamed ATmegaBOOT_1284P bootloader (making it "atmega644P"). Now serial communication works. Everything is fine.
So actually I did not change any fuses myself and it does not matter that the chip comes with other defaults. The one board on which I changed the fuses behaves like the others.
That was unpleasant, I hope it spares somebody else one week of grief.


Go Up