Synchronize DS3231 RTC with PC via Arduino in 3 Steps

0
1180
Synchronize DS3231 RTC with PC via Arduino

Synchronize DS3231 RTC with PC via Arduino

Synchronize DS3231 RTC with PC via Arduino

I wanted to do a data logger for a project with an Arduino and I also need real time. Then I used DS3231RTC (real time clock). I wanted to synchronize this RTC with my PC. I searched some codes to send PC time to Arduino and I found something and I want to share it as my first instructable.

Synchronize DS3231 RTC with PC via Arduino (1/3 steps)

Step 1: Prepare Arduino

You must first download this program to your arduino. This program just gets the time of the PC with special format and write on the CCF.

To see the current time of the CCF, you must write “B”, “on the series. (Without quotes)

For more information visit this site.

Http://tronixstuff.com/2014/12/01/Tutorial-using-DS1307-and-ds3231-Real-Time-Clock-modules-with-Arduino/

Synchronize DS3231 RTC with PC via Arduino (2/3 steps)

Step 2: Send the PC time for Arduino

Synchronize DS3231 RTC with PC via Arduino

To send the PC time, you just need to run this batch file. Before that, right-click on it and modify it. You need to change your arduino COM port. Mine was COM3. So change the number of COM in the batch file. Remember, your PC series should be free. Maybe your serial communication from your arduino IDE is open. Please close it first, then run the batch file.

This batch file is not perfect at all. This was the second time I wrote a batch file. So sometimes you have to run twice. If you see the above image, accordingly, including the time and date with certain prefixes, this means that the batch file is run completely.

SendTime.bat

Sponsered link: See Our Dubai Desert Safari Deals 

Synchronize DS3231 RTC with PC via Arduino (3/3 steps)

Step 3: Results

Synchronize DS3231 RTC with PC via Arduino

Now, if you write “B” on the Arduino series. You will see the same time as your PC.

 

SHARE