![]() |
Erriez DS1302 RTC library for Arduino
2.0.0
DS1302 RTC library for Arduino
|
DS1302 RTC library for Arduino. More...
#include <Arduino.h>#include <time.h>

Go to the source code of this file.
Classes | |
| class | ErriezDS1302 |
| DS1302 RTC class. More... | |
Macros | |
| #define | DS1302_ACB 0x80 |
| DS1302 address/command register. More... | |
| #define | DS1302_ACB_RAM 0x40 |
| Address command RAM. | |
| #define | DS1302_ACB_CLOCK 0x00 |
| Address command clock. | |
| #define | DS1302_ACB_READ 0x01 |
| Address command read. | |
| #define | DS1302_ACB_WRITE 0x00 |
| Address command write. | |
| #define | DS1302_CMD_READ_CLOCK_REG(reg) (DS1302_ACB | DS1302_ACB_CLOCK | (((reg) & 0x1F) << 1) | DS1302_ACB_READ) |
| DS1302 read clock register. | |
| #define | DS1302_CMD_WRITE_CLOCK_REG(reg) (DS1302_ACB | DS1302_ACB_CLOCK | (((reg) & 0x1F) << 1) | DS1302_ACB_WRITE) |
| DS1302 write clock register. | |
| #define | DS1302_CMD_READ_CLOCK_BURST (DS1302_ACB | DS1302_ACB_CLOCK | 0x3E | DS1302_ACB_READ) |
| DS1302 read clock register with burst. | |
| #define | DS1302_CMD_WRITE_CLOCK_BURST (DS1302_ACB | DS1302_ACB_CLOCK | 0x3E | DS1302_ACB_WRITE) |
| DS1302 writeclock register with burst. | |
| #define | DS1302_CMD_READ_RAM(addr) (DS1302_ACB | DS1302_ACB_RAM | (((addr) & 0x1F) << 1) | DS1302_ACB_READ) |
| DS1302 read RAM register. | |
| #define | DS1302_CMD_WRITE_RAM(addr) (DS1302_ACB | DS1302_ACB_RAM | (((addr) & 0x1F) << 1) | DS1302_ACB_WRITE) |
| DS1302 write RAM register. | |
| #define | DS1302_CMD_READ_RAM_BURST (DS1302_ACB | DS1302_ACB_RAM | 0x3E | DS1302_ACB_READ) |
| DS1302 read RAM register with burst. | |
| #define | DS1302_CMD_WRITE_RAM_BURST (DS1302_ACB | DS1302_ACB_RAM | 0x3E | DS1302_ACB_WRITE) |
| DS1302 write RAM register with burst. | |
| #define | DS1302_REG_SECONDS 0x00 |
| DS1302 registers. More... | |
| #define | DS1302_REG_MINUTES 0x01 |
| Minutes register. | |
| #define | DS1302_REG_HOURS 0x02 |
| Hours register. | |
| #define | DS1302_REG_DAY_MONTH 0x03 |
| Day of the month register. | |
| #define | DS1302_REG_MONTH 0x04 |
| Month register. | |
| #define | DS1302_REG_DAY_WEEK 0x05 |
| Day of the week register. | |
| #define | DS1302_REG_YEAR 0x06 |
| Year register. | |
| #define | DS1302_REG_WP 0x07 |
| Write protect register. | |
| #define | DS1302_REG_TC 0x08 |
| Tickle Charger register. | |
| #define | DS1302_NUM_CLOCK_REGS 7 |
| DS1302 number of RAM registers. | |
| #define | DS1302_NUM_RAM_REGS 31 |
| #define | DS1302_SEC_CH 7 |
| DS1302 register bit defines. More... | |
| #define | DS1302_BIT_WP 7 |
| Write protect bit. | |
| #define | DS1302_BIT_READ 0 |
| Bit read. | |
| #define | DS1302_TCS_DISABLE 0x5C |
| Tickle Charger disable value. | |
| #define | DS1302_CLK_LOW() { digitalWrite(_clkPin, LOW); } |
| CLK pin low. | |
| #define | DS1302_CLK_HIGH() { digitalWrite(_clkPin, HIGH); } |
| CLK pin high. | |
| #define | DS1302_CLK_INPUT() { pinMode(_clkPin, INPUT); } |
| CLK pin input. | |
| #define | DS1302_CLK_OUTPUT() { pinMode(_clkPin, OUTPUT); } |
| CLK pin output. | |
| #define | DS1302_IO_LOW() { digitalWrite(_ioPin, LOW); } |
| IO pin low. | |
| #define | DS1302_IO_HIGH() { digitalWrite(_ioPin, HIGH); } |
| IO pin high. | |
| #define | DS1302_IO_INPUT() { pinMode(_ioPin, INPUT); } |
| IO pin input. | |
| #define | DS1302_IO_OUTPUT() { pinMode(_ioPin, OUTPUT); } |
| IO pin output. | |
| #define | DS1302_IO_READ() ( digitalRead(_ioPin) ) |
| IO pin read. | |
| #define | DS1302_CE_LOW() { digitalWrite(_cePin, LOW); } |
| CE pin low. | |
| #define | DS1302_CE_HIGH() { digitalWrite(_cePin, HIGH); } |
| CE pin high. | |
| #define | DS1302_CE_INPUT() { pinMode(_cePin, INPUT); } |
| CE pin input. | |
| #define | DS1302_CE_OUTPUT() { pinMode(_cePin, OUTPUT); } |
| CE pin output. | |
| #define | DS1302_PIN_DELAY() |
| Delay between pin changes. | |
DS1302 RTC library for Arduino.
Source: https://github.com/Erriez/ErriezDS1302 Documentation: https://erriez.github.io/ErriezDS1302
Definition in file ErriezDS1302.h.
| #define DS1302_ACB 0x80 |
DS1302 address/command register.
Address command date/time
Definition at line 40 of file ErriezDS1302.h.
| #define DS1302_REG_SECONDS 0x00 |
| #define DS1302_SEC_CH 7 |
DS1302 register bit defines.
Clock halt bit in seconds register
Definition at line 79 of file ErriezDS1302.h.
1.8.13