Go Down

Topic: ATtiny 85 to trigger Canon camera using IR LEDs and laser tripwire (Read 4347 times) previous topic - next topic

Erni

I just tried another attiny85 and got these result:

That should give the same error (in opposit direction)  at (1503-1500)/1500 = +0,2 %


Code: [Select]
13     B1    Finished   This         48  1493   35  3   4479   7465     49  1503   10  3   4506   7510     50  1510   48  3   4529   7548

Copy-and-paste the following line of code at the top of setup...

 OSCCAL = 0xB1;

--------------------------------------------------
                                    Left                               This                               Right
                                    -------------------------------    -------------------------------    -------------------------------
Step  OSCCAL  State      Position    Cal   9bt  Err  #   C9bt   CClk    Cal   9bt  Err  #   C9bt   CClk    Cal   9bt  Err  #   C9bt   CClk
----  ------  ---------  --------    ---  ----  ---  -  -----  -----    ---  ----  ---  -  -----  -----    ---  ----  ---  -  -----  -----

Coding Badly

#16
Oct 22, 2012, 08:34 pm Last Edit: Oct 22, 2012, 08:45 pm by Coding Badly Reason: 1

Excellent!

Because there are only 128 steps in the OSCCAL value 1, in the worst case, you call not be able to get better than 1/128*100 = 0.78% 2.  The goal is ±1%.  Anything better than that is just good luck.


1 Tiny Tuner 2 uses the full range; 256 values.
2 The actual value is a bit lower because the relationship between OSCCAL and the frequency is not linear.

Erni

Thankyou for the explanation Coding Badly.

BTW as an experiment I tried using 3V in room temperature - and 3V and low temperature (I put the Attiny85 in the freezer), but that didn't change much
3V ->1501
3V low temp. -> 1499

Coding Badly


That has been my experience as well.

I built a three-minute timer for my wife that runs directly from two AA batteries using the internal oscillator (ATtiny13).  Over the entire voltage range (3.2 V to 1.6V) there is less than a two second difference (2/(3*60)*100 = 1.1%).

This should give you a rough idea of what Atmel guarantees...
http://arduino.cc/forum/index.php/topic,125673.msg945182.html#msg945182

Go Up