Understanding effect of clock speed on time functions


hello,

i playing attiny85 , found intresting can't understand.

up till though delay(1000) means 1 second of delay if clock speed set 16 mhz , 2 seconds if speed set 8 mhz (because procesor runs half time slower). correct? millis() if clock set 8 mhz? how counted?

first set attiny85 8 mhz internal clock , use delay(500) blink test, led didn't blink in 1 second interval, more 3 seconds interval. set internal clock 1 mhz , use delay(1000).. blinking interval correct, 1 second delay. happy works how possible? why so?

in boards.txt there line clock speed set.
i think if have set match hardware, delay(1000); result in 1 second delay.
you have check , fuse settings when making tests this.


Arduino Forum > Using Arduino > Microcontrollers > Understanding effect of clock speed on time functions


arduino

Comments

Popular posts from this blog

Convierte tu Raspberry en un NAS. Firmware fvdw-sl 15.3 - Raspberry Pi Forums

How to format a Get Request

avrdude: verification error, first mismatch at byte 0x0000 0x0c != 0x62