Microchip | The Embedded Control Solutions Company Register Login
Browse All
atruntime.com
 10 Code Snippets

RTC BQ32000 driver

atruntime.com

The bq32000 device is a compatible replacement for industry standard real-time clocks. The bq32000 features an automatic backup supply with integrated trickle charger. The backup supply can be implemented using a capacitor or non-rechargeable battery. The bq32000 has a programmable calibration adjustment from –63 ppm to +126 ppm. This ready-to-use piece of software helps you implement this popular RTC in your projects in a few minutes! I'm using software i2C then you can use any I/O port.

About this Code Example

#include "RTC.h"

void main(void)
{

  InitRTC();

  unsigned char sec,min,hour,day, date, month, year;  

  /*set 4:30:00 AM*/ 
  write_sec(0);
  write_min(30);
  write_hour(4);   

 /*set january and 2012*/ 
  write_month(0);
  write_year(12);

    
  while(1)
  {
     sec=    read_sec();
     min=    read_min();
     hour=   read_hour();
     date=   read_date();
     month= read_month();
     year=    read_year();

  }



}

Categories

Release History

  • Jan 28, 2012

    Version: 1.0.0

    first release

Download Contact the Developer

*Required Fields

  • Current Version:1.0.0
  • Created:Jan 28, 2012
  • Updated:Feb 26, 2015
  • Downloads:4916
  • MPLAB Version:8.83
  • C Compiler:C30
  • Development Tools:ICD-3
  • Supported Devices:DSPIC,PIC18

Corporate News

Resources

Stay Connected

Stay up to date with the latest news from Microchip Technology.