Skip to content
This repository has been archived by the owner on Jan 29, 2023. It is now read-only.

Commit

Permalink
v1.4.1
Browse files Browse the repository at this point in the history
### Releases v1.4.1

1. Add support to **Generic or Sparkfun AVR ATmega_32U4** such as **AVR_MAKEYMAKEY, AVR_PROMICRO, etc.**
2. Add support to **Generic or Sparkfun AVR ATmega_328(P)** such as **ARDUINO_REDBOT, ARDUINO_AVR_DIGITAL_SANDBOX, etc.**
3. Add support to **Generic or Sparkfun AVR ATmega128RFA1** such as **ATMEGA128RFA1_DEV_BOARD, etc.**
  • Loading branch information
khoih-prog authored Apr 3, 2021
1 parent 8f1c335 commit af53e3e
Show file tree
Hide file tree
Showing 34 changed files with 218 additions and 78 deletions.
54 changes: 39 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
* [Why do we need this TimerInterrupt library](#why-do-we-need-this-timerinterrupt-library)
* [Features](#features)
* [Why using ISR-based Hardware Timer Interrupt is better](#why-using-isr-based-hardware-timer-interrupt-is-better)
* [Currently supported Boards](#currently-supported-boards)
* [Important Notes about ISR](#important-notes-about-isr)
* [Currently supported Boards](#currently-supported-boards)
* [Changelog](#changelog)
* [Releases v1.4.1](#releases-v141)
* [Releases v1.4.0](#releases-v140)
* [Releases v1.3.0](#releases-v130)
* [Releases v1.2.0](#releases-v120)
Expand Down Expand Up @@ -130,12 +131,21 @@ The catch is your function is now part of an ISR (Interrupt Service Routine), an
- **Arduino ATMega 16U4, 32U4** such as AVR Leonardo, Leonardo ETH, YUN, Esplora, LILYPAD_USB, AVR_ROBOT_CONTROL, AVR_ROBOT_MOTOR, AVR_INDUSTRIAL101, etc.
- **Adafruit ATMega 32U4** such as AVR_FLORA8, AVR_FEATHER32U4, AVR_CIRCUITPLAY, AVR_ITSYBITSY32U4_5V, AVR_ITSYBITSY32U4_3V, AVR_BLUEFRUITMICRO, AVR_ADAFRUIT32U4, etc.
- **Adafruit ATMega 328(P)** such as AVR_METRO, AVR_FEATHER328P, AVR_PROTRINKET5, AVR_PROTRINKET3, AVR_PROTRINKET5FTDI, AVR_PROTRINKET3FTDI, etc.
- **Generic or Sparkfun AVR ATmega_32U4** such as **AVR_MAKEYMAKEY, AVR_PROMICRO, etc.**
- **Generic or Sparkfun AVR ATmega_328(P)** such as **ARDUINO_REDBOT, ARDUINO_AVR_DIGITAL_SANDBOX, etc.**
- **Generic or Sparkfun AVR ATmega128RFA1** such as **ATMEGA128RFA1_DEV_BOARD, etc.**

---
---

## Changelog

### Releases v1.4.1

1. Add support to **Generic or Sparkfun AVR ATmega_32U4** such as **AVR_MAKEYMAKEY, AVR_PROMICRO, etc.**
2. Add support to **Generic or Sparkfun AVR ATmega_328(P)** such as **ARDUINO_REDBOT, ARDUINO_AVR_DIGITAL_SANDBOX, etc.**
3. Add support to **Generic or Sparkfun AVR ATmega128RFA1** such as **ATMEGA128RFA1_DEV_BOARD, etc.**

### Releases v1.4.0

1. Add support to **Adafruit AVR ATMEGA_32U4** such as **AVR_FLORA8, AVR_FEATHER32U4, etc.**
Expand Down Expand Up @@ -182,6 +192,7 @@ The catch is your function is now part of an ISR (Interrupt Service Routine), an
1. [`Arduino IDE 1.8.13+` for Arduino](https://www.arduino.cc/en/Main/Software)
2. [`Arduino AVR core 1.8.3+`](https://github.com/arduino/ArduinoCore-avr) for Arduino AVR boards. Use Arduino Board Manager to install. [![Latest release](https://img.shields.io/github/release/arduino/ArduinoCore-avr.svg)](https://github.com/arduino/ArduinoCore-avr/releases/latest/)
3. [`Adafruit AVR core 1.4.13+`](https://github.com/adafruit/Adafruit_Arduino_Boards) for Adafruit AVR boards. Use Arduino Board Manager to install.
4. [`Sparkfun AVR core 1.1.13+`](https://github.com/sparkfun/Arduino_Boards) for Sparkfun AVR boards. Use Arduino Board Manager to install.

---
---
Expand Down Expand Up @@ -812,8 +823,8 @@ The following is the sample terminal output when running example [ISR_16_Timers_
While software timer, **programmed for 2s, is activated after more than 10.000s in loop().
```
Starting ISR_16_Timers_Array_Complex on AVR
TimerInterrupt v1.4.0
Starting ISR_16_Timers_Array_Complex on Arduino AVR
TimerInterrupt v1.4.1
CPU Frequency = 16 MHz
Starting ITimer2 OK, millis() = 1
SimpleTimer : 2, ms : 10007, Dms : 10007
Expand Down Expand Up @@ -962,8 +973,8 @@ Timer : 15, programmed : 80000, actual : 80010
The following is the sample terminal output when running example [Change_Interval](examples/Change_Interval) on **AVR Mega2560** to demonstrate how to change Timer Interval on-the-fly
```
Starting Change_Interval on AVR
TimerInterrupt v1.4.0
Starting Change_Interval on Arduino AVR
TimerInterrupt v1.4.1
CPU Frequency = 16 MHz
Starting ITimer1 OK, millis() = 1
Starting ITimer2 OK, millis() = 4
Expand Down Expand Up @@ -1013,6 +1024,13 @@ Sometimes, the library will only work if you update the board core to the latest

## Releases

### Releases v1.4.1

1. Add support to **Generic or Sparkfun AVR ATmega_32U4** such as **AVR_MAKEYMAKEY, AVR_PROMICRO, etc.**
2. Add support to **Generic or Sparkfun AVR ATmega_328(P)** such as **ARDUINO_REDBOT, ARDUINO_AVR_DIGITAL_SANDBOX, etc.**
3. Add support to **Generic or Sparkfun AVR ATmega128RFA1** such as **ATMEGA128RFA1_DEV_BOARD, etc.**


### Releases v1.4.0

1. Add support to **Adafruit AVR ATMEGA_32U4** such as **AVR_FLORA8, AVR_FEATHER32U4, etc.**
Expand Down Expand Up @@ -1067,6 +1085,9 @@ in loop(), using delay() function as an example. The elapsed time then is very u
- **Arduino ATMega 16U4, 32U4** such as AVR Leonardo, Leonardo ETH, YUN, Esplora, LILYPAD_USB, AVR_ROBOT_CONTROL, AVR_ROBOT_MOTOR, AVR_INDUSTRIAL101, etc.
- **Adafruit ATMega 32U4** such as AVR_FLORA8, AVR_FEATHER32U4, AVR_CIRCUITPLAY, AVR_ITSYBITSY32U4_5V, AVR_ITSYBITSY32U4_3V, AVR_BLUEFRUITMICRO, AVR_ADAFRUIT32U4, etc.
- **Adafruit ATMega 328(P)** such as AVR_METRO, AVR_FEATHER328P, AVR_PROTRINKET5, AVR_PROTRINKET3, AVR_PROTRINKET5FTDI, AVR_PROTRINKET3FTDI, etc.
- **Generic or Sparkfun AVR ATmega_32U4** such as **AVR_MAKEYMAKEY, AVR_PROMICRO, etc.**
- **Generic or Sparkfun AVR ATmega_328(P)** such as **ARDUINO_REDBOT, ARDUINO_AVR_DIGITAL_SANDBOX, etc.**
- **Generic or Sparkfun AVR ATmega128RFA1** such as **ATMEGA128RFA1_DEV_BOARD, etc.**

---
---
Expand All @@ -1085,16 +1106,19 @@ Submit issues to: [TimerInterrupt issues](https://github.com/khoih-prog/TimerInt

### DONE

1. Longer Interval for timers.
2. Reduce code size if use less timers. Eliminate compiler warnings.
3. Now supporting complex object pointer-type argument.
3. 16 hardware-initiated software-enabled timers while using only 1 hardware timer.
4. Fix some bugs in v1.0.0
5. Add more examples.
6. Similar library for ESP32, ESP8266, SAMD21/SAMD51, nRF52, Mbed-OS Nano-33-BLE, STM32
7. Add support to **Arduino ATMega-16U4, ATMega-32U4**-based boards
8. Add support to **Adafruit ATMega-32U4**-based boards
9. Add support to **Adafruit ATMega-328(P)**-based boards
1. Longer Interval for timers.
2. Reduce code size if use less timers. Eliminate compiler warnings.
3. Now supporting complex object pointer-type argument.
3. 16 hardware-initiated software-enabled timers while using only 1 hardware timer.
4. Fix some bugs in v1.0.0
5. Add more examples.
6. Similar library for ESP32, ESP8266, SAMD21/SAMD51, nRF52, Mbed-OS Nano-33-BLE, STM32
7. Add support to **Arduino ATMega-16U4, ATMega-32U4**-based boards
8. Add support to **Adafruit ATMega-32U4**-based boards
9. Add support to **Adafruit ATMega-328(P)**-based boards
10. Add support to **Generic or Sparkfun AVR ATmega_32U4** such as **AVR_MAKEYMAKEY, AVR_PROMICRO, etc.**
11. Add support to **Generic or Sparkfun AVR ATmega_328(P)** such as **ARDUINO_REDBOT, ARDUINO_AVR_DIGITAL_SANDBOX, etc.**
12. Add support to **Generic or Sparkfun AVR ATmega128RFA1** such as **ATMEGA128RFA1_DEV_BOARD, etc.**

---
---
Expand Down
6 changes: 4 additions & 2 deletions examples/Argument_Complex/Argument_Complex.ino
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
If your data is multiple variables, such as an array and a count, usually interrupts need to be disabled
or the entire sequence of your code which accesses the data.
Version: 1.4.0
Version: 1.4.1
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -35,6 +35,7 @@
1.2.0 K.Hoang 07/01/2021 Add better debug feature. Optimize code and examples to reduce RAM usage
1.3.0 K.Hoang 25/02/2021 Add support to AVR ATMEGA_32U4 such as Leonardo, YUN, ESPLORA, etc.
1.4.0 K.Hoang 01/04/2021 Add support to Adafruit 32U4 and 328(P) such as FEATHER32U4, FEATHER328P, etc.
1.4.1 K.Hoang 02/04/2021 Add support to Sparkfun 32U4, 328(P), 128RFA1 such as AVR_PROMICRO, REDBOT, etc.
*****************************************************************************************************************************/

// These define's must be placed at the beginning before #include "TimerInterrupt.h"
Expand Down Expand Up @@ -104,7 +105,8 @@ void setup()
Serial.begin(115200);
while (!Serial);

Serial.println(F("\nStarting Argument_Complex on AVR"));
Serial.print(F("\nStarting Argument_Complex on "));
Serial.println(BOARD_TYPE);
Serial.println(TIMER_INTERRUPT_VERSION);
Serial.print(F("CPU Frequency = ")); Serial.print(F_CPU / 1000000); Serial.println(F(" MHz"));

Expand Down
6 changes: 4 additions & 2 deletions examples/Argument_None/Argument_None.ino
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
If your data is multiple variables, such as an array and a count, usually interrupts need to be disabled
or the entire sequence of your code which accesses the data.
Version: 1.4.0
Version: 1.4.1
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -35,6 +35,7 @@
1.2.0 K.Hoang 07/01/2021 Add better debug feature. Optimize code and examples to reduce RAM usage
1.3.0 K.Hoang 25/02/2021 Add support to AVR ATMEGA_32U4 such as Leonardo, YUN, ESPLORA, etc.
1.4.0 K.Hoang 01/04/2021 Add support to Adafruit 32U4 and 328(P) such as FEATHER32U4, FEATHER328P, etc.
1.4.1 K.Hoang 02/04/2021 Add support to Sparkfun 32U4, 328(P), 128RFA1 such as AVR_PROMICRO, REDBOT, etc.
*****************************************************************************************************************************/

// These define's must be placed at the beginning before #include "TimerInterrupt.h"
Expand Down Expand Up @@ -99,7 +100,8 @@ void setup()
Serial.begin(115200);
while (!Serial);

Serial.println(F("\nStarting Argument_None on AVR"));
Serial.print(F("\nStarting Argument_None on "));
Serial.println(BOARD_TYPE);
Serial.println(TIMER_INTERRUPT_VERSION);
Serial.print(F("CPU Frequency = ")); Serial.print(F_CPU / 1000000); Serial.println(F(" MHz"));

Expand Down
6 changes: 4 additions & 2 deletions examples/Argument_Simple/Argument_Simple.ino
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
If your data is multiple variables, such as an array and a count, usually interrupts need to be disabled
or the entire sequence of your code which accesses the data.
Version: 1.4.0
Version: 1.4.1
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -35,6 +35,7 @@
1.2.0 K.Hoang 07/01/2021 Add better debug feature. Optimize code and examples to reduce RAM usage
1.3.0 K.Hoang 25/02/2021 Add support to AVR ATMEGA_32U4 such as Leonardo, YUN, ESPLORA, etc.
1.4.0 K.Hoang 01/04/2021 Add support to Adafruit 32U4 and 328(P) such as FEATHER32U4, FEATHER328P, etc.
1.4.1 K.Hoang 02/04/2021 Add support to Sparkfun 32U4, 328(P), 128RFA1 such as AVR_PROMICRO, REDBOT, etc.
*****************************************************************************************************************************/

// These define's must be placed at the beginning before #include "TimerInterrupt.h"
Expand Down Expand Up @@ -107,7 +108,8 @@ void setup()
Serial.begin(115200);
while (!Serial);

Serial.println(F("\nStarting Argument_Simple on AVR"));
Serial.print(F("\nStarting Argument_Simple on "));
Serial.println(BOARD_TYPE);
Serial.println(TIMER_INTERRUPT_VERSION);
Serial.print(F("CPU Frequency = ")); Serial.print(F_CPU / 1000000); Serial.println(F(" MHz"));

Expand Down
6 changes: 4 additions & 2 deletions examples/Change_Interval/Change_Interval.ino
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
If your data is multiple variables, such as an array and a count, usually interrupts need to be disabled
or the entire sequence of your code which accesses the data.
Version: 1.4.0
Version: 1.4.1
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -35,6 +35,7 @@
1.2.0 K.Hoang 07/01/2021 Add better debug feature. Optimize code and examples to reduce RAM usage
1.3.0 K.Hoang 25/02/2021 Add support to AVR ATMEGA_32U4 such as Leonardo, YUN, ESPLORA, etc.
1.4.0 K.Hoang 01/04/2021 Add support to Adafruit 32U4 and 328(P) such as FEATHER32U4, FEATHER328P, etc.
1.4.1 K.Hoang 02/04/2021 Add support to Sparkfun 32U4, 328(P), 128RFA1 such as AVR_PROMICRO, REDBOT, etc.
*****************************************************************************************************************************/

/*
Expand Down Expand Up @@ -121,7 +122,8 @@ void setup()
Serial.begin(115200);
while (!Serial);

Serial.println(F("\nStarting Change_Interval on AVR"));
Serial.print(F("\nStarting Change_Interval on "));
Serial.println(BOARD_TYPE);
Serial.println(TIMER_INTERRUPT_VERSION);
Serial.print(F("CPU Frequency = ")); Serial.print(F_CPU / 1000000); Serial.println(F(" MHz"));

Expand Down
6 changes: 4 additions & 2 deletions examples/FakeAnalogWrite/FakeAnalogWrite.ino
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
If your data is multiple variables, such as an array and a count, usually interrupts need to be disabled
or the entire sequence of your code which accesses the data.
Version: 1.4.0
Version: 1.4.1
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -35,6 +35,7 @@
1.2.0 K.Hoang 07/01/2021 Add better debug feature. Optimize code and examples to reduce RAM usage
1.3.0 K.Hoang 25/02/2021 Add support to AVR ATMEGA_32U4 such as Leonardo, YUN, ESPLORA, etc.
1.4.0 K.Hoang 01/04/2021 Add support to Adafruit 32U4 and 328(P) such as FEATHER32U4, FEATHER328P, etc.
1.4.1 K.Hoang 02/04/2021 Add support to Sparkfun 32U4, 328(P), 128RFA1 such as AVR_PROMICRO, REDBOT, etc.
*****************************************************************************************************************************/
/*
Notes:
Expand Down Expand Up @@ -202,7 +203,8 @@ void setup()
Serial.begin(115200);
while (!Serial);

Serial.println(F("\nStarting FakeAnalogWrite on AVR"));
Serial.print(F("\nStarting FakeAnalogWrite on "));
Serial.println(BOARD_TYPE);
Serial.println(TIMER_INTERRUPT_VERSION);
Serial.print(F("CPU Frequency = ")); Serial.print(F_CPU / 1000000); Serial.println(F(" MHz"));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
If your data is multiple variables, such as an array and a count, usually interrupts need to be disabled
or the entire sequence of your code which accesses the data.
Version: 1.4.0
Version: 1.4.1
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -35,6 +35,7 @@
1.2.0 K.Hoang 07/01/2021 Add better debug feature. Optimize code and examples to reduce RAM usage
1.3.0 K.Hoang 25/02/2021 Add support to AVR ATMEGA_32U4 such as Leonardo, YUN, ESPLORA, etc.
1.4.0 K.Hoang 01/04/2021 Add support to Adafruit 32U4 and 328(P) such as FEATHER32U4, FEATHER328P, etc.
1.4.1 K.Hoang 02/04/2021 Add support to Sparkfun 32U4, 328(P), 128RFA1 such as AVR_PROMICRO, REDBOT, etc.
*****************************************************************************************************************************/

// These define's must be placed at the beginning before #include "TimerInterrupt.h"
Expand Down Expand Up @@ -306,7 +307,8 @@ void setup()
Serial.begin(115200);
while (!Serial);

Serial.println(F("\nStarting ISR_16_Timers_Array_Complex on AVR"));
Serial.print(F("\nStarting ISR_16_Timers_Array_Complex on "));
Serial.println(BOARD_TYPE);
Serial.println(TIMER_INTERRUPT_VERSION);
Serial.print(F("CPU Frequency = ")); Serial.print(F_CPU / 1000000); Serial.println(F(" MHz"));

Expand Down
6 changes: 4 additions & 2 deletions examples/ISR_RPM_Measure/ISR_RPM_Measure.ino
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
If your data is multiple variables, such as an array and a count, usually interrupts need to be disabled
or the entire sequence of your code which accesses the data.
Version: 1.4.0
Version: 1.4.1
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -35,6 +35,7 @@
1.2.0 K.Hoang 07/01/2021 Add better debug feature. Optimize code and examples to reduce RAM usage
1.3.0 K.Hoang 25/02/2021 Add support to AVR ATMEGA_32U4 such as Leonardo, YUN, ESPLORA, etc.
1.4.0 K.Hoang 01/04/2021 Add support to Adafruit 32U4 and 328(P) such as FEATHER32U4, FEATHER328P, etc.
1.4.1 K.Hoang 02/04/2021 Add support to Sparkfun 32U4, 328(P), 128RFA1 such as AVR_PROMICRO, REDBOT, etc.
*****************************************************************************************************************************/
/* RPM Measuring uses high frequency hardware timer 1Hz == 1ms) to measure the time from of one rotation, in ms
then convert to RPM. One rotation is detected by reading the state of a magnetic REED SW or IR LED Sensor
Expand Down Expand Up @@ -141,7 +142,8 @@ void setup()
Serial.begin(115200);
while (!Serial);

Serial.println(F("\nStarting ISR_RPM_Measure on AVR"));
Serial.print(F("\nStarting ISR_RPM_Measure on "));
Serial.println(BOARD_TYPE);
Serial.println(TIMER_INTERRUPT_VERSION);
Serial.print(F("CPU Frequency = ")); Serial.print(F_CPU / 1000000); Serial.println(F(" MHz"));

Expand Down
6 changes: 4 additions & 2 deletions examples/ISR_Switch/ISR_Switch.ino
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
If your data is multiple variables, such as an array and a count, usually interrupts need to be disabled
or the entire sequence of your code which accesses the data.
Version: 1.4.0
Version: 1.4.1
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -35,6 +35,7 @@
1.2.0 K.Hoang 07/01/2021 Add better debug feature. Optimize code and examples to reduce RAM usage
1.3.0 K.Hoang 25/02/2021 Add support to AVR ATMEGA_32U4 such as Leonardo, YUN, ESPLORA, etc.
1.4.0 K.Hoang 01/04/2021 Add support to Adafruit 32U4 and 328(P) such as FEATHER32U4, FEATHER328P, etc.
1.4.1 K.Hoang 02/04/2021 Add support to Sparkfun 32U4, 328(P), 128RFA1 such as AVR_PROMICRO, REDBOT, etc.
*****************************************************************************************************************************/
/****************************************************************************************************************************
ISR_Switch demontrates the use of ISR to avoid being blocked by other CPU-monopolizing task
Expand Down Expand Up @@ -258,7 +259,8 @@ void setup()
Serial.begin(115200);
while (!Serial);

Serial.println(F("\nStarting ISR_Switch on AVR"));
Serial.print(F("\nStarting ISR_Switch on "));
Serial.println(BOARD_TYPE);
Serial.println(TIMER_INTERRUPT_VERSION);
Serial.print(F("CPU Frequency = ")); Serial.print(F_CPU / 1000000); Serial.println(F(" MHz"));

Expand Down
6 changes: 4 additions & 2 deletions examples/ISR_Timer_Complex/ISR_Timer_Complex.ino
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
If your data is multiple variables, such as an array and a count, usually interrupts need to be disabled
or the entire sequence of your code which accesses the data.
Version: 1.4.0
Version: 1.4.1
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -35,6 +35,7 @@
1.2.0 K.Hoang 07/01/2021 Add better debug feature. Optimize code and examples to reduce RAM usage
1.3.0 K.Hoang 25/02/2021 Add support to AVR ATMEGA_32U4 such as Leonardo, YUN, ESPLORA, etc.
1.4.0 K.Hoang 01/04/2021 Add support to Adafruit 32U4 and 328(P) such as FEATHER32U4, FEATHER328P, etc.
1.4.1 K.Hoang 02/04/2021 Add support to Sparkfun 32U4, 328(P), 128RFA1 such as AVR_PROMICRO, REDBOT, etc.
*****************************************************************************************************************************/

/****************************************************************************************************************************
Expand Down Expand Up @@ -226,7 +227,8 @@ void setup()
Serial.begin(115200);
while (!Serial);

Serial.println(F("\nStarting ISR_Timer_Complex on AVR"));
Serial.print(F("\nStarting ISR_Timer_Complex on "));
Serial.println(BOARD_TYPE);
Serial.println(TIMER_INTERRUPT_VERSION);
Serial.print(F("CPU Frequency = ")); Serial.print(F_CPU / 1000000); Serial.println(F(" MHz"));

Expand Down
Loading

0 comments on commit af53e3e

Please sign in to comment.