Expand description
DS1302 real time clock-calendar platform agnostic driver
§About
The DS1302 trickle-charge timekeeping chip contains a real-time clock/calendar and 31 bytes of static RAM. It
communicates with a microprocessor via a simple serial interface. The real-time clock/calendar provides seconds,
minutes, hours, day, date, month, and year information. The end of the month date is automatically adjusted for
months with fewer than 31 days, including corrections for leap year. The clock operates in either the 24-hour or
12-hour format with an AM/PM indicator. The chip driver is based on embedded-hal
traits.
Datasheet: DS1302
§Driver features:
- Reading/setting clock/calendar data
- 12-hour (AM/PM) or 24-hour format
- Changing the time format while the chip is working
NEW (4.0.0 release):
- Programmable Trickle Charger configuration
- 31 x 8 Battery-Backed General-Purpose RAM operations
Structs§
Enums§
- Ds
- Trickle charger diode select. diode drop 0.7v or 1.4v.
- Ds1302
Error - DS1302 error
- Hours
- Hour information: 12-hour (AM/PM) or 24-hour
- Mode
- Hour format: 12-hour (AM/PM) or 24-hour
- Rs
- Trickle charger resistor select.
Traits§
- Delay
- For timing
ds1302
uses fugit crate which only providesDuration
andInstant
types. It does not provide any clock or timer traits. Thereforeds1302
has its ownDelay
trait that provides all timing capabilities that are needed for the library. User must implement this trait for the timer by itself.