Archive for 23 Aug 2010

RTC Module (Part 2)

Part 1, 2, 3, 4, 5, 6, 7 After the hardware description of the module, I will describe here the code required for driving it with Arduino. Firstly, we need to establish a SPI communication between Arduino (the master) and DS1306 (the slave). And here is the initialization routine for the SPI void spi_init(void) { // Initialize SPI port // Input pin […]