Nov 21, 2016

Digital Clock with DS3231, TM1637 (STM32F103C8T6)

It is really simple to do. Only 4 wires for DS3231 (the real time clock), 4 wires for TM1637 (in this case is 4 digit display), 2 wires for STM32F103C8 (32-bit microcontroller).
DS3231 wires are: VCC, GND, SCL (goes to PA.7), SDA (goes to PA.6)
TM1637 wires are: VCC, GND, CLK (goes to PA.0), DIO (goes to PA.1)
STM32F103C8 wires are: VCC and GND.
DS3231 is an extremely accurate I2C real time clock, accuracy 2ppm (at 0-40 degC) that is about a minute per year.

Digital Clock
DS3231 equipped with 3V battery to keep RTC counting when power off. There's no push buttons for time setup yet, time setup is done in the software. After running program with time setup, give comment sign (//) to the time setup line and reload program. You can get the code https://drive.google.com, compile it and download the hex to microcontroller using STLINK-V2.

ST-LINK V2


No comments:

Post a Comment

Water Level Sensor of Washing Machine (STM32F103C8T6)

Washing Machine Typical work principle of water level sensor of a washing machine shown on the picture. Sensor is located above the wa...