Hardware Reference
In-Depth Information
I have this script set to start on boot with the following command:
# chkconfig pi-rtc on
When you next reboot the Raspberry Pi, your RTC will be loaded and activated.
Now that you have successfully added an RTC to your Raspberry Pi you can use it as either a quick and simple
pocket desktop or an offline data logger.
Summary
In this chapter you had the chance to learn about the origins of RTCs and how they can function on a very basic level.
You were introduced to the MC146818 and the much-cloned RTC. I gave you information on how you could poke its
registers to gain certain date or time values. I then moved on to the DS1338Z-33, which would provide all the RTC
functions for this chapter.
You can't have an RTC without a timing source. I talked about how crystal oscillators work and what their
functions are. I also talked about why the Raspberry Pi Foundation has left the RTC out. Then we moved on to your
first time using SMT components in this topic. I showed you some tools to make your life easier and some tricks to
make you less nervous when doing small SMT work. It was then time to construct the circuit to hold the battery. This
involved cutting a premade PCB and adapting it to your needs. Do remember that the dust from these boards is toxic
and you should take caution when working with them.
Lastly you finally got to connect the RTC to the Raspberry Pi via the I2C bus. What a useful bus! Unfortunately,
you soon found out that not all was perfect and that your RTC cannot be used at early boot stages without some kernel
modifications. Not to worry, because I gave you the second best thing with a fully functional init.d script that takes
care of all the hard work for you.
 
Search WWH ::




Custom Search