Pins
ground
Ground
power
Positive voltage (5V)
i2c
I2C data line
i2c
I2C clock line
output
Square wave output
Attributes
string
default:"now"
Initial time of the RTC: “0”, “now”, or a valid ISO 8601 date string
Simulation Behavior
The simulated DS1307 is automatically initialized to the current system time when starting the simulation. It then keeps counting the time. You can override the initial time by setting theinitTime attribute to a different value. The value can be either a valid ISO 8601 date string (e.g. “2019-11-19T11:41:56Z”), or one of the following special values:
- “0” - Set the initial time to “2000-01-01T00:00:00Z”
- “now” - Set the initial time to the current system time
“Z” at the end of the date string indicates that the time is in UTC, and not in the local time zone. If you omit the “Z”, the time will be interpreted as local time.
Square Wave Output (SQW)
The SQW pin can output a square wave signal at one of four frequencies, or a static high/low level. Using the RTClib library, you can configure the SQW output withwriteSqwPinMode():