Raspberry Pi Real Time Clock Module
Fitting InstructionsThe Real Time Clock (RTC) Module for the Raspberry Pi has been carefully designed to ensure that it fits within the footprint of the Raspberry Pi, and so should fit into almost any case.
These fitting instructions apply to all versions of the RTC Module, including those with a temperature sensor fitted. For the temperature sensor only board (ie. no RTC), please skip the section about fitting a battery.
1. Firstly, fit the CR1620 battery supplied with the RTC Module. To do this, carefully remove the battery from its packaging and slide into the battery holder on the underside of the RTC Module. Make sure that the + sign on the battery faces the + sign on the battery holder (see picture).
Fitting the RTC Module's battery
2. Plug the RTC Module into the first six GPIO pins closest to the SD Card end of the Raspberry Pi, so that the RTC Module is above the small DSI connector (see picture).
Fitting the RTC Module on the first six GPIO pins
The RTC Module in place on the Raspberry Pi
3. When you first start your Raspberry Pi after fitting the RTC Module, you will need to set the system date and time in the usual way, but afterwards the RTC Module will retain the date & time when the Raspberry Pi is switched off.
Setting up the RTCSupport for the RTC in RISC OS is already built-in, and just needs configuring to 'Set manually' from the "Time and Date" settings in Configure. Alternatively, if no network time is found, it will default to the RTC time.
Raspbian 'Jessie'If you are using an earlier version of Raspbian prior to 'Jessie' then you will need to follow the instructions here instead.
If you are using Raspian Linux 3.18 or later you need to go into the Raspberry Pi config utility and enable I2C:
Select "(9) Advanced Options" and then "A7 I2C - Enable/Disable automatic loading". A prompt will appear asking "Would you like the ARM I2C interface to be enabled?", select "Yes". After this it will ask you about adding this to the kernal also select "Yes". Exit the utility and reboot your Raspberry Pi.
Install i2c-tools using:
Once you have installed I2C check that the RTC has been detected using:
The RTC should appear on channel 68 as shown in the screen shot below. If the RTC doe not appear, check that the board is correctly fitted.
Edit config.txt to add the following: dtoverlay=i2c-rtc,ds1307
At the end of the file add
Add the module to /etc/modules:
Add at the end of the file
Save your changes - To Save Your edits Hold control and Press "X" Then Press "Y" and then Return or Enter
Next edit /lib/udev/hwclock-set
Comment out the following lines with # Like this:
Reboot the Raspberry Pi.
If the Raspberry Pi is connected to the internet the correct date and time should be set automatically otherwise you can set the current date and time using:
DO THIS!: You can check the current linux date with the command (date). To save the date onto the RTC Pi use the following command:
Verify the date has been saved onto the RTC Pi with:
If everything worked correctly the RTC Pi should be initialised on boot and the current date and time will be loaded into Linux.
Many thanks to ABElectronics for their notes and instructions which these instructions are based upon.
IIC AddressesIf you wish to access the RTC and/or Temperature Sensor chips directly, their IIC address are:
RTC IIC address: &D0 (write), &D1 (read)
Temperature sensor IIC address: &9E (write), &9F (read)
Pass-Through and Additional HeadersThe RTC Module has support for additional headers, should you wish to fit them, to allow connection of a Power-on LED (either 3.3V or 5V) on J1 and pass-through of the IIC bus on J2. Also available are the SQW/Out output from the RTC and Alert output from the Temperature Sensor (if fitted). Details of how to use these outputs can be found on the relevant datasheet for each chip.
For ROHS, WEEE and CE Certification information, click here.
Pass-Through and Additional Headers
If you have a sales enquiry please email our sales department
78 Brighton Road, Worthing, West Sussex, BN11 2EN, UK. 01903 523222 (full contact details)
If you have any comments or problems please email firstname.lastname@example.org
CJE Micro’s is not responsible for the contents of external internet sites.
Page last updated Saturday, 09-Jan-2016 16:42:11 GMT