Initialize Real Time Clock - Alfat

Good Morning,

I have a couple of questions concerning the initialization of the real time clock.

In the owner’s Manual the command (T) is described in two ways; Shared Mode and Backup mode.

Will Shared mode correctly continue the RTC when the power is shut down? (I believe the answer is no)

Can I assume Backup mode needs both an external crystal and a battery power supply? The SDR board does not seem to have an external clock location but does have an external VBAT pin. Does this mean the SDR card can not utilize the backup mode?

The manual also says it is important to use the (T) command before setting the time (section 7.4.4). Does this mean that it has to be done once for initial setup and that setting will then hold no matter how many times the power is turned off/on, or once each time the power is toggled on/off or each time you set the time?

Thanks
Steve

[quote]Will Shared mode correctly continue the RTC when the power is shut down? (I believe the answer is no) [/quote] => No, so you are right

[quote]The SDR board does not seem to have an external clock location but does have an external VBAT pin[/quote], if SDR then it does, I think it is Q2

[quote]
Does this mean that it has to be done once for initial setup and that setting will then hold no matter how many times the power is turned off/on, or once each time the power is toggled on/off or each time you set the time?[/quote]

If it is back up mode, then No, need only once, does not matter how many time the power is toggled, unless VBAT is disconnected.
If shared mode, then YES, when the power off, you have to re - initialize.

Hi Dat,

Thanks, good information. Is it possible to send me a schematic of the SDR card?

Steve

@ Bad Steve - The schematic and EAGLE files are available on the resource tab of this link: https://www.ghielectronics.com/catalog/product/523

Thanks

Good Afternoon,

I hope you monitor old threads. I have asked this question before, and got an answer, but I am not sure if I am doing something wrong because it is still not working. I am using the ALFAT, and trying to change the time and date. I initialize the the ALFAT with the “T B”, then write a date into the chip and read it back successfully. The problem I am having is when I turn off the power and try to write the time to the chip again. It comes back with the success value but the time does not change. It will not change until I send another “T B” command. then it works as expected, until I toggle the power again.
If you scroll down through this thread, I have asked the question regarding this issue and was given the following answer…

[quote]If it is back up mode, then No, need only once, does not matter how many time the power is toggled, unless VBAT is disconnected.
If shared mode, then YES, when the power off, you have to re - initialize. [/quote]

VBAT never goes away, it is a separate battery. Can you please confirm the workings of the clock and maybe give me a reason for seeing what I am seeing?

Thank you

@ Bad Steve -

What version firmware are you using and what board please?

I just check version 2.0.0 and it works fine. Here are steps I did:

  • Power up the board (battery connected, of course)
  • Send “T B”
  • Send “G T”. Response: 00:00:02
  • Send “S 34212002”. The time will start from 04:00:04 1/1/2006.
  • Send “G T”. Response: 04:00:06
  • Disconnect power completely.
  • Power up the board again
  • Send “G T”. Response: 04:00:012

I believe version 1.0.8 is same behavior. No need to send T B again.

@ Dat

Thanks for the help and sorry for the long response time. The description in your response is not my exact problem. I too get what you have described. My problem as follows…

  • Power Board
  • Send “T B”
  • Send “G T”. Response: 00:00:02
  • Send “S 34212002”. The time will start from 04:00:04 1/1/2006.
  • Send “G T”. Response: 04:00:06
  • Send “G D”. Response: 01-01-2006
  • Disconnect power completely.
  • Power up the board again
  • Send “S 496B200F”. The time will start from 04:00:30 11/11/2016.
  • Send “G T”. Response: Original time + testing time period
  • Send “G D”. Response: 01-01-2006

The time does not shift to the new time/date stamp sent. It only changes if I send a new “T B” and then the new date/time stamp. Is that correct behavior? I do not even believe there has to be a power shutdown in between. Just the setting of the new Date/Time stamp does not take. The response is always the original date/time stamp.

  • The version I am using - v2.0.0

@ Bad Steve -

If you want to reset the RTC time, you should initialize it since everything was lost after power off.
Except for RTC counter still function so you can get date and time, ALFAT don’t remember what your config was.

@ Dat,

Thank you, I will just send the “T B” command before changing the date. It has worked every time since I have tried that approach.

Steve

@ Bad Steve -

Just do it once after power off or Reset, no need to do every time changing date & time.