The Raspberry Pi doesn’t have a little coin-battery-powered ‘Real Time Clock’ (RTC) module, which keeps time even when the power is off, or the battery removed.
To keep costs low and the size small, an RTC is not included with the Raspberry Pi. If your Raspberry Pi is connected to the Internet via Ethernet or WiFi, the time/date will be automatically updated from the global ntp (nework time protocol) servers
For stand-alone projects with no network connection, you will not be able to keep the time when the power goes out.
So in this project we will show you how to add a RTC Click shield from Mikroelektronika, without the use of iron solder or breadboard.
These boards are just for example ( they don’t need any iron solder to connect ) , since this tutorial could be considered valid for any other boards using PCF8583 with Raspberry PI.
We just need to insert the two Click board as per below images.
A Raspberry PI with Pi Click shield ( on the left ) and a RTC Click shield ( on the right )
The 3 boards ( Raspberry PI ( on the bottom ) – Pi click Shield ( on the middle ) – RC Click shield ( on the top )
Now that we have the module correctly inserted we can set up the module, configuring the I2C :
If you are using Raspbian, you will need to open LXTerminal and enter the following command:
sudo nano /etc/modules
and add these two lines to the end of the file
i2c-bcm2708 i2c-dev
After editing the file, you will need to reboot for the changes to take effect.
The I2C bus allows multiple devices to be connected to your Raspberry Pi, each with a unique address, that can often be set by changing jumper settings on the module. It is very useful to be able to see which devices are connected to your Pi as a way of making sure everything is working.
To do this, it is worth running the following commands in the Terminal to install the i2c-tools utility.
Depending on your distribution, you may also have a file called /etc/modprobe.d/raspi-blacklist.conf If you do not have this file then there is nothing to do, however, if you do have this file, you need to edit it and comment out the lines below:
blacklist spi-bcm2708
blacklist i2c-bcm2708
.. by putting a # in front of them. Open an editor on the file by typing
sudo nano /etc/modprobe.d/raspi-blacklist.conf
.. then edit the file so that it appears as below, and then save and exit the file using CTRL-x and Y.
Once this is all done, reboot!
sudo reboot
Now when you log in you can type the following command to see all the connected devices (if you are running a 512MB Raspberry Pi Model B)
I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt out if you wish.ACCEPTCheck Privacy Policy
Manage consent
Privacy Overview
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.