attiny84 with arduino-tiny core, 8Mhz got wrong timing

I've got a few attiny84 IC and was testing the blink... using arduino-tiny cores ( Google Code Archive - Long-term storage for Google Code Project Hosting. )

When I flash with 1Mhz , the blink is correct at 1 sec but when I flash using 8Mhz, the blink is NOT blinking at 1 sec ( it was blinking like 8-10 secs slower, timing was totally out )

How do I fix this wrong timing for the 8Mhz attiny84 ?

Thanks

I hv checked the boards.txt, it was as default without any changes...

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

attiny84at8.name=ATtiny84 @ 8 MHz  (internal oscillator; BOD disabled)


# The following DO work (pick one)...
attiny84at8.upload.using=arduino:arduinoisp

attiny84at8.upload.maximum_size=8192

# Default clock (slowly rising power; long delay to clock; 8 MHz internal)
# Int. RC Osc. 8 MHz; Start-up time PWRDWN/RESET: 6 CK/14 CK + 64 ms; [CKSEL=0010 SUT=10]; default value

attiny84at8.bootloader.low_fuses=0xE2
attiny84at8.bootloader.high_fuses=0xD7
attiny84at8.bootloader.extended_fuses=0xFF
attiny84at8.bootloader.path=empty
attiny84at8.bootloader.file=empty84at8.hex

attiny84at8.build.mcu=attiny84
attiny84at8.build.f_cpu=8000000L
attiny84at8.build.core=tiny
 
###########################################################################

attiny84at1.name=ATtiny84 @ 1 MHz  (internal oscillator; BOD disabled)

attiny84at1.upload.using=arduino:arduinoisp


attiny84at1.upload.maximum_size=8192

# Default clock (slowly rising power; long delay to clock; 8 MHz internal; divide clock by 8)
# Int. RC Osc. 8 MHz; Start-up time PWRDWN/RESET: 6 CK/14 CK + 64 ms; [CKSEL=0010 SUT=10]; default value
# Divide clock by 8 internally; [CKDIV8=0]

attiny84at1.bootloader.low_fuses=0x62
attiny84at1.bootloader.high_fuses=0xD7
attiny84at1.bootloader.extended_fuses=0xFF
attiny84at1.bootloader.path=empty
attiny84at1.bootloader.file=empty84at1.hex

attiny84at1.build.mcu=attiny84
attiny84at1.build.f_cpu=1000000L
attiny84at1.build.core=tiny
 
###########################################################################

Ensure the ATtiny84 @ 8 MHz board is selected. Execute Tools / Burn Bootloader. Upload your sketch.

1 Like

Dear Coding...

I did that... for attiny84, when I select 1Mhz, timing is correct but when I select 8Mhz, timing is 8 times slower..

When I tried with attiny85, 8Mhz was okay previously...

Did you do "burn bootloader"?

1 Like

Ohh.... got it... burn bootloader to set the fuses using an empty hex file... then Upload actual hex...
the default fuse probably at 1Mhz...

Thanks... fixed..