Zápisník experimentátora
Hierarchy: DS1307 Hodiny reálneho času
The DS1307 is an integrated circuit with real-time clocks. It features a simple construction and a relatively high accuracy. It can also be purchased as a module, but in this article we will use a directly integrated circuit, crystal and breadboard.
We will need these parts:
Connect the components according to the following scheme.
The DS1307 communicates via the I2C bus, so two pull-up resistory on the SCL and SDA pins are needed. Communication with Arduino would also work without them thanks to an internal pull-up resistors, but it is better to put it as follows. Their value is not critical. 10k but 4k7 will work the same.
The best way to communicate is to use two libraries:
Both libraries can be installed directly through Library Manager if you use IDE 1.6.x. Communication with the device it is very straight forward. All your code can be derived from the two examples that are enclosed in a library DS1307RTC.
Due to the use on the breadboard, the accuracy of the circuit will not be exactly as it would be on a normal field. Metal paths in the test field show a certain parasitic capacity that slightly detunes the clock in the circuit. But it is enough for the experiments, and you know that the transition to normal circuitry should stabilize the accuracy.
02.10.2017