You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 29, 2023. It is now read-only.
### Releases v1.0.1
1. Add complicated example [ISR_16_Timers_Array](examples/ISR_16_Timers_Array) utilizing and demonstrating the full usage of 16 independent ISR Timers.
This library enables you to use Interrupt from Hardware Timers on an SAMD-based board.
14
+
This library enables you to use Interrupt from Hardware Timers on an SAMD-based board, such as SAMD21 Nano-33-IoT, Adafruit SAMD51 Itsy-Bitsy M4, etc.
15
+
16
+
As **Hardware Timers are rare, and very precious assets** of any board, this library now enables you to use up to **16 ISR-based Timers, while consuming only 1 Hardware Timer**. Timers' interval is very long (**ulong millisecs**).
15
17
16
18
### Why do we need this Hardware Timer Interrupt?
17
19
18
20
Imagine you have a system with a **mission-critical** function, measuring water level and control the sump pump or doing something much more important. You normally use a software timer to poll, or even place the function in loop(). But what if another function is **blocking** the loop() or setup().
19
21
20
-
So your function **might not be executed, and the result would be disastrous.**
22
+
So your function **might not be executed on-time or not at all, and the result would be disastrous.**
21
23
22
24
You'd prefer to have your function called, no matter what happening with other functions (busy loop, bug, etc.).
23
25
@@ -42,6 +44,10 @@ The catch is **your function is now part of an ISR (Interrupt Service Routine),
42
44
---
43
45
---
44
46
47
+
### Releases v1.0.1
48
+
49
+
1. Add complicated example [ISR_16_Timers_Array](examples/ISR_16_Timers_Array) utilizing and demonstrating the full usage of 16 independent ISR Timers.
50
+
45
51
### Releases v1.0.0
46
52
47
53
1. Permit up to 16 super-long-time, super-accurate ISR-based timers to avoid being blocked
@@ -61,16 +67,17 @@ The catch is **your function is now part of an ISR (Interrupt Service Routine),
61
67
62
68
1.[`Arduino IDE 1.8.13+` for Arduino](https://www.arduino.cc/en/Main/Software)
63
69
2.[`Arduino SAMD core v1.8.9+`](https://www.arduino.cc/en/Guide/ArduinoM0) for SAMD ARM Cortex-M0+ boards (Nano 33 IoT, etc.).
64
-
3.[`Adafruit SAMD core v1.6.3+`](https://www.adafruit.com/) for SAMD ARM Cortex-M0+ and M4 boards (Itsy-Bitsy M4, etc.)
5.[`Blynk library 0.6.1+`](https://github.com/blynkkk/blynk-library) to use with certain example.
67
73
6. To use with certain example, depending on which Ethernet card you're using:
68
74
-[`Ethernet library v2.0.0+`](https://www.arduino.cc/en/Reference/Ethernet) for W5100, W5200 and W5500.
69
75
-[`Ethernet2 library v1.0.4+`](https://github.com/khoih-prog/Ethernet2) for W5500 (Deprecated, use Arduino Ethernet library).
70
76
-[`Ethernet3 library v1.5.3+`](https://github.com/sstaub/Ethernet3) for W5500/WIZ550io/WIZ850io/USR-ES1 with Wiznet W5500 chip.
71
77
-[`EthernetLarge library v2.0.0+`](https://github.com/OPEnSLab-OSU/EthernetLarge) for W5100, W5200 and W5500. ***Ready*** from v1.0.1.
72
78
-[`UIPEthernet library v2.0.9+`](https://github.com/UIPEthernet/UIPEthernet) for ENC28J60.
73
-
79
+
7. To use with certain example
80
+
-[`SimpleTimer library`](https://github.com/schinken/SimpleTimer) for [ISR_16_Timers_Array example](examples/ISR_16_Timers_Array).
74
81
---
75
82
---
76
83
@@ -125,22 +132,22 @@ These files must be copied into the directory:
125
132
126
133
Whenever the above-mentioned compiler error issue is fixed with the new Arduino SAMD release, you don't need to copy the `Arduino.h` file anymore.
127
134
128
-
2.**To be able to automatically detect and display BOARD_NAME on Adafruit SAMD (Itsy-Bitsy M4, etc) boards**, you have to copy the file [Adafruit SAMD platform.txt](Packages_Patches/adafruit/hardware/samd/1.6.3) into Adafruit samd directory (~/.arduino15/packages/adafruit/hardware/samd/1.6.3).
135
+
2.**To be able to automatically detect and display BOARD_NAME on Adafruit SAMD (Itsy-Bitsy M4, etc) boards**, you have to copy the file [Adafruit SAMD platform.txt](Packages_Patches/adafruit/hardware/samd/1.6.4) into Adafruit samd directory (~/.arduino15/packages/adafruit/hardware/samd/1.6.4).
129
136
130
-
Supposing the Adafruit SAMD core version is 1.6.3. This file must be copied into the directory:
137
+
Supposing the Adafruit SAMD core version is 1.6.4. This file must be copied into the directory:
3.**To be able to automatically detect and display BOARD_NAME on Seeeduino SAMD (XIAO M0, Wio Terminal, etc) boards**, you have to copy the file [Seeeduino SAMD platform.txt](Packages_Patches/Seeeduino/hardware/samd/1.7.9) into Adafruit samd directory (~/.arduino15/packages/Seeeduino/hardware/samd/1.7.9).
146
+
3.**To be able to automatically detect and display BOARD_NAME on Seeeduino SAMD (XIAO M0, Wio Terminal, etc) boards**, you have to copy the file [Seeeduino SAMD platform.txt](Packages_Patches/Seeeduino/hardware/samd/1.8.1) into Adafruit samd directory (~/.arduino15/packages/Seeeduino/hardware/samd/1.8.1).
140
147
141
-
Supposing the Seeeduino SAMD core version is 1.7.9. This file must be copied into the directory:
148
+
Supposing the Seeeduino SAMD core version is 1.8.1. This file must be copied into the directory:
4. The following is the sample terminal output when running example [ISR_16_Timers_Array](examples/ISR_16_Timers_Array) on **Arduino SAMD21 SAMD_NANO_33_IOT** to demonstrate the accuracy of ISR Hardware Timer, **especially when system is very busy or blocked**. The 16 independent ISR timers are **programmed to be activated repetitively after certain intervals, is activated exactly after that programmed interval !!!**
839
+
840
+
While software timer, **programmed for 2s, is activated after 10.000s in loop()!!!**.
841
+
842
+
In this example, 16 independent ISR Timers are used, yet utilized just one Hardware Timer. The Timer Intervals and Function Pointers are stored in arrays to facilitate the code modification.
simpleTimerDoingSomething2s: Delta programmed ms = 2000, actual = 10000
880
+
1s: Delta ms = 1000, ms = 12421
881
+
11s: Delta ms = 11000, ms = 12421
882
+
1s: Delta ms = 1000, ms = 13421
883
+
2s: Delta ms = 2000, ms = 13421
884
+
3s: Delta ms = 3000, ms = 13421
885
+
4s: Delta ms = 4000, ms = 13421
886
+
6s: Delta ms = 6000, ms = 13421
887
+
12s: Delta ms = 12000, ms = 13421
888
+
1s: Delta ms = 1000, ms = 14421
889
+
13s: Delta ms = 13000, ms = 14421
890
+
1s: Delta ms = 1000, ms = 15421
891
+
2s: Delta ms = 2000, ms = 15421
892
+
7s: Delta ms = 7000, ms = 15421
893
+
14s: Delta ms = 14000, ms = 15421
894
+
1s: Delta ms = 1000, ms = 16421
895
+
3s: Delta ms = 3000, ms = 16421
896
+
5s: Delta ms = 5000, ms = 16421
897
+
15s: Delta ms = 15000, ms = 16421
898
+
1s: Delta ms = 1000, ms = 17421
899
+
2s: Delta ms = 2000, ms = 17421
900
+
4s: Delta ms = 4000, ms = 17421
901
+
8s: Delta ms = 8000, ms = 17421
902
+
16s: Delta ms = 16000, ms = 17421
903
+
1s: Delta ms = 1000, ms = 18421
904
+
1s: Delta ms = 1000, ms = 19421
905
+
2s: Delta ms = 2000, ms = 19421
906
+
3s: Delta ms = 3000, ms = 19421
907
+
6s: Delta ms = 6000, ms = 19421
908
+
9s: Delta ms = 9000, ms = 19421
909
+
1s: Delta ms = 1000, ms = 20421
910
+
1s: Delta ms = 1000, ms = 21421
911
+
2s: Delta ms = 2000, ms = 21421
912
+
4s: Delta ms = 4000, ms = 21421
913
+
5s: Delta ms = 5000, ms = 21421
914
+
10s: Delta ms = 10000, ms = 21421
915
+
simpleTimerDoingSomething2s: Delta programmed ms = 2000, actual = 10000
916
+
1s: Delta ms = 1000, ms = 22421
917
+
3s: Delta ms = 3000, ms = 22421
918
+
7s: Delta ms = 7000, ms = 22421
919
+
1s: Delta ms = 1000, ms = 23421
920
+
2s: Delta ms = 2000, ms = 23421
921
+
11s: Delta ms = 11000, ms = 23421
922
+
1s: Delta ms = 1000, ms = 24421
923
+
1s: Delta ms = 1000, ms = 25421
924
+
2s: Delta ms = 2000, ms = 25421
925
+
3s: Delta ms = 3000, ms = 25421
926
+
4s: Delta ms = 4000, ms = 25421
927
+
6s: Delta ms = 6000, ms = 25421
928
+
8s: Delta ms = 8000, ms = 25421
929
+
12s: Delta ms = 12000, ms = 25421
930
+
1s: Delta ms = 1000, ms = 26421
931
+
5s: Delta ms = 5000, ms = 26421
932
+
1s: Delta ms = 1000, ms = 27421
933
+
2s: Delta ms = 2000, ms = 27421
934
+
13s: Delta ms = 13000, ms = 27421
935
+
1s: Delta ms = 1000, ms = 28421
936
+
3s: Delta ms = 3000, ms = 28421
937
+
9s: Delta ms = 9000, ms = 28421
938
+
1s: Delta ms = 1000, ms = 29421
939
+
2s: Delta ms = 2000, ms = 29421
940
+
4s: Delta ms = 4000, ms = 29421
941
+
7s: Delta ms = 7000, ms = 29421
942
+
14s: Delta ms = 14000, ms = 29421
943
+
1s: Delta ms = 1000, ms = 30421
944
+
1s: Delta ms = 1000, ms = 31421
945
+
2s: Delta ms = 2000, ms = 31421
946
+
3s: Delta ms = 3000, ms = 31421
947
+
5s: Delta ms = 5000, ms = 31421
948
+
6s: Delta ms = 6000, ms = 31421
949
+
10s: Delta ms = 10000, ms = 31421
950
+
15s: Delta ms = 15000, ms = 31421
951
+
simpleTimerDoingSomething2s: Delta programmed ms = 2000, actual = 10000
952
+
1s: Delta ms = 1000, ms = 32421
953
+
1s: Delta ms = 1000, ms = 33421
954
+
2s: Delta ms = 2000, ms = 33421
955
+
4s: Delta ms = 4000, ms = 33421
956
+
8s: Delta ms = 8000, ms = 33421
957
+
16s: Delta ms = 16000, ms = 33421
958
+
1s: Delta ms = 1000, ms = 34421
959
+
3s: Delta ms = 3000, ms = 34421
960
+
11s: Delta ms = 11000, ms = 34421
829
961
```
830
962
---
831
963
---
832
964
965
+
### Releases v1.0.1
966
+
967
+
1. Add complicated example [ISR_16_Timers_Array](examples/ISR_16_Timers_Array) utilizing and demonstrating the full usage of 16 independent ISR Timers.
968
+
833
969
### Releases v1.0.0
834
970
835
971
1. Permit up to 16 super-long-time, super-accurate ISR-based timers to avoid being blocked
0 commit comments