In this chapter, we will look at programming the RTC, Real-Time Clock. There are three approaches to programming the Real-Time Clock that we will look at. The first will be when we simply use an external crystal to create a signal that we can count to synchronize the operation of a clock. The second will use the DS3231 RTC module, which is a separate device we can connect to the PIC. This uses the I2C protocol we have looked at in Chapter 7 to communicate with the PIC.
The third approach will use the ...