Pages: [1]   Go Down
Author Topic: ATMega8-16pu too slow  (Read 487 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I've put an Atmega8-16pu in the Arduino duemilanove board.
I use the USBtinyISP to burn sketches

This is my config of boards.txt

##############################################################

usbtiny8.name=ATmega8 avec USBtinyISP
usbtiny8.upload.using=usbtinyisp
usbtiny8.upload.maximum_size=7168
usbtiny8.upload.speed=38400
usbtiny8.build.mcu=atmega8
usbtiny8.build.f_cpu=16000000L
usbtiny8.build.core=arduino

When I burn, I can see the sketch work fine but very slow.
Exemple to make 1 loop of Blink @ 1000 high 1000 low take 3,02 seconds

I've check datasheets of Atmega8 vs Atmega328 and pinout are same...

What's my problem?
Thanks

Sorry for my english I'm swiss
Logged

UK
Offline Offline
God Member
*****
Karma: 17
Posts: 568
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What bootloader are you using?
What are the fuse settings?
Post the sketch. I know you said it was just Blink, but still post it.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Tack and Tanks,

No bootloader
No Fuse

Sketch:

void setup() {                
  pinMode(13, OUTPUT);    
}

void loop() {
  digitalWrite(13, HIGH);  
  delay(1000);            
  digitalWrite(13, LOW);    
  delay(1000);            
}

I've trying this but result is same:

##############################################################

usbtiny8.name=ATmega8 avec USBtinyISP
usbtiny8.upload.using=usbtinyisp
usbtiny8.upload.maximum_size=7168
usbtiny8.upload.speed=38400
usbtiny8.upload.speed=115200
usbtiny8.bootloader.low_fuses=0xff
usbtiny8.bootloader.high_fuses=0xc8
usbtiny8.bootloader.unlock_bits=0x3F
usbtiny8.bootloader.lock_bits=0x0F
usbtiny8.build.mcu=atmega8
usbtiny8.build.f_cpu=16000000L
usbtiny8.build.core=arduino
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Re-Hello

I've changed:
Code:
usbtiny8.build.f_cpu=16000000L
by
Code:
usbtiny8.build.f_cpu=1600000L
and connected an Arduino Mega with this sketch:

Code:
long tmps;
int ok;

void setup() {
  Serial.begin(9600);
  pinMode(2, INPUT);
}

void loop() {
  if (digitalRead(2) == 1)
  {
    if (ok == 1)
    {
      Serial.println(millis() - tmps);
      tmps = millis();
      ok = 0;
    }
 
  }
  else
  {
    ok = 1;
  }
}


The mega give me 2045 or 2046 ms
not bad but not awesome...
Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 144
Posts: 5358
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What are you timing? "Serial.println()"?

That's going to depend on the baud rate, not the speed of the CPU.

Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Pages: [1]   Go Up
Jump to: