VMA301 Odd Behavior

I have 2 of the VMA301 RTC boards and they are both acting weird. I did have them working at one point and I didn’t make any code changes. I tried the example code below and got the same results. I hope someone can help me figure it out because it’s driving me a little nuts! LOL

Here’s what I get from my Serial monitoring. I hope this helps:

16:07:51.942 → getDOWStr: 000:00:00
16:07:51.942 → getDateStr: 00/00/2000
16:07:51.942 → getTimeStr: 00:00:00

16:07:53.981 → getDOWStr: 000:00:00
16:07:53.981 → getDateStr: 00/00/2000
16:07:53.981 → getTimeStr: 00:00:00

16:07:56.038 → getDOWStr: 000:00:00
16:07:56.038 → getDateStr: 41/01/2004
16:07:56.038 → getTimeStr: 00:00:00

16:07:58.082 → getDOWStr: 100:00:00
16:07:58.082 → getDateStr: 00/00/2000
16:07:58.082 → getTimeStr: 00:00:00

16:08:00.130 → getDOWStr: 000:00:00
16:08:00.130 → getDateStr: 00/00/2000
16:08:00.130 → getTimeStr: 00:00:00

16:08:02.184 → getDOWStr: 000:00:00
16:08:02.184 → getDateStr: 00/00/2000
16:08:02.184 → getTimeStr: 00:00:00

16:08:04.216 → getDOWStr: 000:00:00
16:08:04.216 → getDateStr: 00/00/2000
16:08:04.250 → getTimeStr: 00:00:00

16:08:06.286 → getDOWStr: 000:00:00
16:08:06.286 → getDateStr: 00/00/2000
16:08:06.286 → getTimeStr: 00:00:00

16:08:08.334 → getDOWStr: 000:00:00
16:08:08.334 → getDateStr: 00/00/2000
16:08:08.334 → getTimeStr: 00:00:00

16:08:10.367 → getDOWStr: 000:00:00
16:08:10.367 → getDateStr: 00/00/2000
16:08:10.367 → getTimeStr: 00:00:00

16:08:12.426 → getDOWStr: 000:00:00
16:08:12.426 → getDateStr: 00/00/2000
16:08:12.426 → getTimeStr: 00:00:00

16:08:14.474 → getDOWStr: 000:00:00
16:08:14.474 → getDateStr: 00/00/2000
16:08:14.474 → getTimeStr: 00:00:00

16:08:16.515 → getDOWStr: 000:00:00
16:08:16.515 → getDateStr: 00/00/2000
16:08:16.515 → getTimeStr: 00:00:00

16:08:18.576 → getDOWStr: Tuesday
16:08:18.576 → getDateStr: 03/02/2009
16:08:18.576 → getTimeStr: 01:00:51

16:08:20.599 → getDOWStr: Tuesday
16:08:20.633 → getDateStr: 07/02/2009
16:08:20.633 → getTimeStr: 01:00:19

16:08:22.646 → getDOWStr: Tuesday
16:08:22.683 → getDateStr: 07/02/2009
16:08:22.683 → getTimeStr: 01:00:01

16:08:24.697 → getDOWStr: Tuesday
16:08:24.731 → getDateStr: 03/02/2009
16:08:24.731 → getTimeStr: 01:00:03

16:08:26.771 → getDOWStr: Saturday
16:08:26.771 → getDateStr: 07/06/2019
16:08:26.771 → getTimeStr: 15:44:45

16:08:28.810 → getDOWStr: 715:44:45
16:08:28.810 → getDateStr: 85/85/2165
16:08:28.810 → getTimeStr: 27:85:85


Example Code:

// DS1302_LCD
// Copyright (C)2015 Rinky-Dink Electronics, Henning Karlsen. All right reserved
// web: http://www.RinkyDinkElectronics.com/
//
// A quick demo of how to use my DS1302-library to make a quick
// clock using a DS1302 and a 16x2 LCD.
//
// I assume you know how to connect the DS1302 and LCD.
// DS1302: CE pin → Arduino Digital 2
// I/O pin → Arduino Digital 3
// SCLK pin → Arduino Digital 4
// LCD: DB7 → Arduino Digital 6
// DB6 → Arduino Digital 7
// DB5 → Arduino Digital 8
// DB4 → Arduino Digital 9
// E → Arduino Digital 10
// RS → Arduino Digital 11

#include <LiquidCrystal.h>
#include <DS1302.h>

// Init the DS1302
DS1302 rtc(32, 33, 34);

// Init the LCD
LiquidCrystal lcd(22, 23, 24, 25, 26, 27, 28);

void setup()
{
// Set the clock to run-mode, and disable the write protection
rtc.halt(false);
rtc.writeProtect(false);

// Setup LCD to 16x2 characters
lcd.begin(20, 2);

// The following lines can be commented out to use the values already stored in the DS1302
rtc.setDOW(FRIDAY); // Set Day-of-Week to FRIDAY
rtc.setTime(12, 0, 0); // Set the time to 12:00:00 (24hr format)
rtc.setDate(6, 8, 2010); // Set the date to August 6th, 2010
}

void loop()
{
// Display time centered on the upper line
lcd.setCursor(4, 0);
lcd.print(rtc.getTimeStr());

// Display abbreviated Day-of-Week in the lower left corner
lcd.setCursor(0, 1);
lcd.print(rtc.getDOWStr(FORMAT_SHORT));

// Display date in the lower right corner
lcd.setCursor(6, 1);
lcd.print(rtc.getDateStr());

// Wait one second before repeating :slight_smile:
delay (1000);
}