Program an Attiny85 to 1 Mhz
Blink and LED at delay(20) the blink and LED at delayMicrosecond(20*1000);
The blink delay for delayMicroseconds is super slow.
I'm the most recent download 0013 with Arduino 1.0.1.
If I change the bootloader/fuse settings to 8 Mhz it works fine.
Example code:
void setup()
{
pinMode(SERVO_PIN, OUTPUT);
pinMode(LED_PIN, OUTPUT);
for (int ii = 0; ii < 2; ii++)
{
digitalWrite(LED_PIN, HIGH);
delay(500);
digitalWrite(LED_PIN, LOW);
delay(500);
}
for (int ii = 0; ii < 50; ii++)
{
digitalWrite(LED_PIN, HIGH);
delay(20);
digitalWrite(LED_PIN, LOW);
delay(20);
}
for (int ii = 0; ii < 2; ii++)
{
digitalWrite(LED_PIN, HIGH);
delay(500);
digitalWrite(LED_PIN, LOW);
delay(500);
}
for (int ii = 0; ii < 50; ii++)
{
digitalWrite(LED_PIN, HIGH);
delayMicroseconds(lenMicroSecondsOfPeriod);
digitalWrite(LED_PIN, LOW);
delayMicroseconds(lenMicroSecondsOfPeriod);
}
for (int ii = 0; ii < 2; ii++)
{
digitalWrite(LED_PIN, HIGH);
delay(1000);
digitalWrite(LED_PIN, LOW);
delay(1000);
}
}
Original issue reported on code.google.com by rick.rickanderson on 28 May 2012 at 3:26
Original issue reported on code.google.com by
rick.rickanderson
on 28 May 2012 at 3:26