Skip to content

Commit

Permalink
V1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
felias-fogg committed Jun 30, 2023
1 parent 59845d4 commit 9fd9d5f
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 7 deletions.
8 changes: 8 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,11 @@ V1.0.0 (27.06.2023)
V1.0.1 (27.06.2023)
- moved utility folder to extras in order to be compliant with the
Arduino library rules

V1.1.0
- added ATtiny13 (with a really stripped down output and no error
checking)

V1.1.1
- had to add ATtiny13 conditionals in the init function in order to avoid getting an error from the
Vcc library
2 changes: 1 addition & 1 deletion extras/calibServer/calibServer.ino
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// open drain pin using Timer1. Additionally, it passes the 1200 baud output of a target board
// to Serial.

#define VERSION "1.1.0"
#define VERSION "1.1.1"

#define FREQPIN MISO
#define TTYPIN SCK
Expand Down
2 changes: 1 addition & 1 deletion extras/calibTarget/calibTarget.ino
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// a fully calibrated clock will give us 100000 counts.


#define VERSION "1.1.0"
#define VERSION "1.1.1"

//#define TRUEMILLIVOLT 3309 // the true voltage measured in mV
#define TRUEMILLIVOLT 5003 // the true voltage measured in mV
Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "avrCalibrate",
"version": "1.1.0",
"version": "1.1.1",
"keywords": "calibration, internal reference voltage, MCU clock, OSCCAL",
"description": "Supports calibration of OSCCAL value and internal reference voltage and supports setting them at startup",
"repository":
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=avrCalibrate
version=1.0.2
version=1.1.1
author=Bernhard Nebel <nebel@hinterm-ziel.de>
maintainer=Bernhard Nebel <nebel@hinterm-ziel.de>
sentence=This library determines OSCCAL calibration values for MCU clock frequency and internal reference voltage and loads them at setup.
Expand Down
9 changes: 6 additions & 3 deletions src/avrCalibrate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@
#endif

void avrCalibrate::init(int osccal,
#if !defined(__AVR_ATtiny2313__) && !defined(__AVR_ATtiny2313A__) && !defined(__AVR_ATtiny4313__)
#if !defined(__AVR_ATtiny2313__) && !defined(__AVR_ATtiny2313A__) && !defined(__AVR_ATtiny4313__) && \
!defined(__AVR_ATtiny13__) && !defined(__AVR_ATtiny13A__)
int intref)
#else
__attribute__ ((unused)) int intref)
#endif
{
if (osccal >= 0 && osccal <= 0xFF) // only legal OSCCAL values!
OSCCAL = osccal;
#if !defined(__AVR_ATtiny2313__) && !defined(__AVR_ATtiny2313A__) && !defined(__AVR_ATtiny4313__)
#if !defined(__AVR_ATtiny2313__) && !defined(__AVR_ATtiny2313A__) && !defined(__AVR_ATtiny4313__) && \
!defined(__AVR_ATtiny13__) && !defined(__AVR_ATtiny13A__)
if (intref >= 0) // only legal values
Vcc::setIntref(intref);
#endif
Expand All @@ -23,7 +25,8 @@ void avrCalibrate::init(int osccal,
void avrCalibrate::init(void)
{
init(eeprom_read_byte((byte *)(E2END-1)) == 0 ? eeprom_read_byte((byte *)E2END) : NOOSCCAL,
#if !defined(__AVR_ATtiny2313__) && !defined(__AVR_ATtiny2313A__) && !defined(__AVR_ATtiny4313__)
#if !defined(__AVR_ATtiny2313__) && !defined(__AVR_ATtiny2313A__) && !defined(__AVR_ATtiny4313__) && \
!defined(__AVR_ATtiny13__) && !defined(__AVR_ATtiny13A__)
(int)eeprom_read_word((uint16_t *)EE_INTREF));
#else
NOVOLT);
Expand Down

0 comments on commit 9fd9d5f

Please sign in to comment.