Skip to content

Commit

Permalink
Added support for ATmega32U4 (only at 16 MHz)
Browse files Browse the repository at this point in the history
  • Loading branch information
leomil72 committed Jan 27, 2017
1 parent 01aec6a commit d649523
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
7 changes: 6 additions & 1 deletion README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ It's based on an internal timer and it requires no external hardware.

VERSION HISTORY

2017/01/27 - v. 1.2.7: added support for ATmega32U4 (thanks to Esteban Torre and piluex)
2016/05/21 - v. 1.2.6: fixed timestamp functions when we are in leap years (I hope definitely..)
2016/02/21 - v. 1.2.5: fixed a bug into the deltaT arithmetics that leads to double count the computation.
2016/02/14 - v. 1.2.4: updated to use with latest Arduino IDE branches (>=1.6.7)
Expand Down Expand Up @@ -175,10 +176,14 @@ The library uses the Timer 0 because Timer 1 is a 16 bit counter that is a littl
ATMEL Atmega644/1284
The library uses the Timer 2, so keep it in mind if you think to use PWM on phisical pins 20 & 21.

ATMEL ATmega32U4:
The library uses the Timer 3 on this chip.

** I M P O R T A N T **
The library supports, due to rounding issues, only the following speed clocks:
- Atmega644/1284, Atmega48/88/168/328, Atmega8, Atmega640/1280/1281/2560/2561: 1, 4, 8, and 16 MHz
- Attiny25/45/85, Attiny24/44/84, Attiny2313: 1, 8, and 16 MHz
- Atmega32U4: only 16 MHz

********************************************************************

Expand Down Expand Up @@ -212,4 +217,4 @@ lesto - from <www.arduino.cc> forum

********************************************************************

Last document revision: 2016/05/22
Last document revision: 2017/01/27
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=swRTC
version=1.2.6
version=1.2.7
author=Leonardo Miliani, lesto
maintainer=Leonardo Miliani
sentence=Software implementation of a Real-Time Clock for Arduino boards and Atmel microcontrollers.
Expand Down
3 changes: 1 addition & 2 deletions swRTC.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@
#endif

//RTC module is preset in: ATMEGA8, ATMEGAx44, ATMEGAx8, ATMEGAx0
//RTC is NOT in: ATTINYx4, ATTINYx5, ATTINYx313
//Not sure on: ATMEGA32u4
//RTC is NOT in: ATTINYx4, ATTINYx5, ATTINYx313, ATMEGA32u4
#if defined (USE_INTERNAL_RTC)
#if defined (ATTINYx4) || defined (ATTINYx313) || defined (ATTINYx5) || defined(ATMEGAxU)
#error This MCU does NOT have the RTC module
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.6
1.2.7

2 comments on commit d649523

@Michelebuffa
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ottima libreria !
E' possibile avanzare una richiesta di aggiungere una funzione che si leghi più semplicemente ad un server NTP per sincronizzare l' ora del swRTC senza utilizzare il Timestrap tipo "rtc.UpdateClockWithNTP(timeClient.getFormattedTime()); " in modo che possa collaborare quasi in modo nativo con la libreria NTPClient ?
Grazie mille

@leomil72
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Esistono altre librerie per la gestione del tempo via NTP, e non è nelle idee iniziali di swRTC l'intento di collegarsi in remoto per prendere l'orario. Grazie comunque del suggerimento.

Please sign in to comment.