iqbal0001 / arduino-tiny

Automatically exported from code.google.com/p/arduino-tiny
Other
0 stars 0 forks source link

Millis not perfect with internal 1 Mhz #75

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Miliis function is not working properly when internal 1 MHz oscillator is used 
in the ATTiny85.

I programmed ATTINY85 to change an LED state every 10 Seconds... It starts 
well... But after 3 minutes or so, i can see a 5 second advancement in the 
process. ie.,LED changes state 5 seconds before itself... When i used 8 Mhz 
mode it was some 3 seconds and when i used 20 MHz mode with external oscillator 
i can see a delay of 2 seconds after 5 Minutes...

Finally i used a 16 MHz crystal and it was working fine... 

Now what should i do to make it work perfectly at 1MHz mode?

i tried changing some values in boards.txt... everything seems to be fine in 
it...

Original issue reported on code.google.com by mdilyas1...@gmail.com on 3 May 2013 at 7:03

GoogleCodeExporter commented 8 years ago
Have you tuned the oscillator?

Original comment by arduino....@gmail.com on 3 May 2013 at 5:22

GoogleCodeExporter commented 8 years ago
what is to tune the oscillator... sorry i dont get it.....

Original comment by mdilyas1...@gmail.com on 8 May 2013 at 8:18

GoogleCodeExporter commented 8 years ago
Search the datasheet for "OSCCAL".  Read all sections that include that 
keyword.  Pay particularly close attention to this section...

6. System Clock and Clock Options
6.2 Clock Sources
6.2.3 Calibrated Internal Oscillator

Search the Arduino Forum for "poor man's tiny tuner"...
https://www.google.com/search?q=poor+man%27s+tiny+tuner+site:arduino.cc%2Fforum

Original comment by arduino....@gmail.com on 8 May 2013 at 6:16

GoogleCodeExporter commented 8 years ago
Thanks for ur help

Original comment by mdilyas1...@gmail.com on 10 May 2013 at 11:41