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?
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.
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
Post a Comment