Pages: [1]   Go Down
Author Topic: Speed slow, what to do?  (Read 483 times)
0 Members and 1 Guest are viewing this topic.
Erlangen, Germany
Offline Offline
Jr. Member
**
Karma: 1
Posts: 70
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Δεν ελπίζω τίποτα. Δε φοβούμαι τίποτα. Είμαι λέφτερος.

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 212
Posts: 8966
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Factory chips run at 1 MHz (8 MHz internal RC clock and prescale defaulting to smiley-cool.  Sounds like you didn't set the fuses for the external 16 MHz crystal and default prescale of 1.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Erlangen, Germany
Offline Offline
Jr. Member
**
Karma: 1
Posts: 70
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
« Last Edit: March 05, 2012, 03:17:56 pm by godo » Logged

Δεν ελπίζω τίποτα. Δε φοβούμαι τίποτα. Είμαι λέφτερος.

Erlangen, Germany
Offline Offline
Jr. Member
**
Karma: 1
Posts: 70
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

[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!
Logged

Δεν ελπίζω τίποτα. Δε φοβούμαι τίποτα. Είμαι λέφτερος.

Erlangen, Germany
Offline Offline
Jr. Member
**
Karma: 1
Posts: 70
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

Δεν ελπίζω τίποτα. Δε φοβούμαι τίποτα. Είμαι λέφτερος.

Pages: [1]   Go Up
Jump to: