问题
I work with Raspberry Pi 2 model B v1.1 and I searched about a RTC to keep time even in the case of a power outage or a loss of internet connection. I found that I must buy a RTC chip with a battery. But recently I heard that my Raspberry Pi already contains a RTC. But is it right? If so, where is its location? I don't see anything called RTC on my chip.
回答1:
I am fairly certain there is not an RTC chip built-in: "One of the complaints Pi users have is that there's no built-in hardware clock on the Pi." (Source: https://www.element14.com/community/community/raspberry-pi/raspberry-pi-accessories/blog/2015/04/22/raspberry-pi-2-piface-rtc-shim-testing).
However, I was able to find a nice tutorial on how to install your own.
回答2:
None of the Raspberry Pi models have a built-in real time clock.
回答3:
As cool as Raspberry Pi's are the B+ and 2 models do not have a physical RTC. According to the RaspberryPi.org website, Where I found this blurb, the decision was made not to include RTC's because they wanted to keep the cost down.
"5. WHY IS THERE NO REAL-TIME CLOCK (RTC)?
The expectation is that non-network-connected units will have their clocks updated manually at startup. Adding an RTC is surprisingly expensive once you have factored in batteries, area and components, and would have pushed us above our target price. You can add one yourself using the GPIO pins if you’d like an interesting electronics project. -Performance and Cost Considerations -Top"
POSSIBLE SOLUTION
I'm like you, and I have a real need for a RTC. I'm currently building this that I found on Instructables. Link Here, Check it Out
回答4:
I think we've all concluded that none of the Pis have RTCs so to keep time without network and the ntp daemon, an external RTC is needed. I recommend getting the ds3231 over the ds1307. The price difference is negligible - you can find both units for ~$1 including free shipping at your favourite Shenzen outlet. The important difference is that the ds3231 is more accurate due to its built-in temperature compensation.
Quotes from this site where you can also find some code for interfacing with both units:
"The DS1307 used in the first module works very well, however the external temperature can affect the frequency of the oscillator circuit which drives the DS1307’s internal counter."
"The DS3231 is much more accurate, as it has an internal oscillator which isn’t affected by external factors – and thus is accurate down to a few minutes per year at the most."
来源:https://stackoverflow.com/questions/36161221/does-the-raspberry-pi-2-model-b-v1-1-have-an-internal-rtc