-
1Step 1
To choose the Timer edit Time.ccp Line to Timer number:
Example Timer 1:
```#Define TIMERVAR 1```
Same to Reserve Pin D8 for ICP1:
```#Define Pin8 1```
-
2Step 2
Codeexample:
Setup():
initTimer(2,0,2); //Standard Settings init (Timer2, Internal clock,INT0(Pin2) DS3231 SQWPin 1Hz->INT0
Loop() Overwiew:
CalibrateNow();
Serial.println("New Calculation Frequency for PrecMillis()");
Serial.println(recalculateF_CPU());
Serial.println(precmillis());
Serial.println( myprecmillis - mymillis - sync);
Output: (Good Measurement, The Millis from Core Drifts 2-4ms/Second) The Real Delay(1000) maybe ca. 1060ms
New Calculation Frequency for PrecMillis()
11993117
14591
39
15658
42
16725
45
17793
50
18860
55
19927
58
20995
63
22061
65
23129
71
24196
75
25263
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.