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.
Synchronize DS3231 RTC with PC via Arduino (2/3 steps)
Step 2: Send the PC time for 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.
Sponsered link: See Our Dubai Desert Safari Deals
Synchronize DS3231 RTC with PC via Arduino (3/3 steps)
Step 3: Results
Now, if you write “B” on the Arduino series. You will see the same time as your PC.