Microcontroller › PIC › Reg-RTC › hai duddy, The
August 21, 2015 at 9:38 am
#13192
karthick.v
Participant
hai duddy,
The following is the rtc program i have an doubt in this program that why we are giving for hours sendi2c(0x02);//////for minutes sendi2c(0x01);////for seconds sendi2c(0x00);//////date sendi2c(0x04);/////month sendi2c(0x05);//////year sendi2c(0x07);///////
// RTC Interface with PIC 16F877A:
#include<pic.h>
void portconfig();
void sendi2c(char x);
char receivei2c();
void start();
void stop();
void rpstart();
void delay();
void lcd_cmd();
void cmd(char , char );
//void lcd_data(char);
char arr[ ]="TIME : : : .";
char arr1[ ]="DATE : – – . ";
void lcd_con(int );
void time();
void date();
int conv(int i);
void rtc_write();
void rtc_read();
int h,y;
void main()
{
int h,y,D2;
portconfig();
ADCON1=0X07;
lcd_cmd();
SSPCON=0X38;
SSPCON2=0X00;
SSPSTAT=0X80;
SSPADD=9;
cmd(0X80,0);
for(h=0;arr[h]!='