Revolution-FX

RTC (Real-Time Clock)

RTCReset


Prototype:
  void RTCReset();
Parameters: None

Description: Resets RTC.


RTCStart


Prototype:
  void RTCStart();
Parameters: None

Description: Starts RTC and being counting.


RTCStop


Prototype:
  void RTCStop();
Parameters: None

Description: Stops RTC and stop counting.


RTCRead...


Prototypes:
  int RTCReadYear();
  int RTCReadMonth();
  int RTCReadDayOfMonth();
  int RTCReadDayOfWeek();
  int RTCReadHour();
  int RTCReadMinute();
  int RTCReadSecond();
Parameters: None

Description: These functions return the date and time as a integer. RTCReadSecond, in particular, is useful for seeding the random generator.


RTCSet...


Prototypes:
  void RTCSetYear(unsigned char thousands, unsigned char hundreds, unsigned char tens, unsigned char ones);
  void RTCSetMonth(unsigned char tens, unsigned char ones);
  void RTCSetDayOfMonth(unsigned char tens, unsigned char ones);
  void RTCSetDayOfWeek(unsigned char ones);
  void RTCSetHour(unsigned char tens, unsigned char ones);
  void RTCSetMinute(unsigned char tens, unsigned char ones);
  void RTCSetSecond(unsigned char tens, unsigned char ones);
Parameters (Depends):

thousands - Thousands place
hundreds - Hundreds place
tens - Tens place
ones - Ones place

Description: These set of functions set the time and date. The CPU sees these values as BCD (binary coded decimals, so you'll have to split your number by it's decimal places. For example: Example:
   // Set 2007 as the year into the RTC
   RTCSetYear(2, 0, 0, 7);


SourceForge.net LogoContact Us | ©2007 Revolution-FX Development Team