permisi master : program ini kenapa eror ya ketika di…

permisi master :
program ini kenapa eror ya ketika di compile
eror nya di--> rtc_get_date(&d,&t,&y);

#include
#include
#include
#asm
.equ __i2c_port=0x12 ;PORTD
.equ __sda_bit=7
.equ __scl_bit=6
#endasm
#include
#include
#asm
.equ __lcd_port=0x15 ;PORTC
#endasm
#include
unsigned char h,m,s,d,t,y;
char buffer[16];
void main(void){
DDRB.0=1;
i2c_init();
rtc_init(0,0,0);
delay_ms(100);
lcd_init(16);
lcd_clear();
lcd_putsf("Date=");
lcd_gotoxy(0,1);
lcd_putsf("Time=");
while (1) {
rtc_get_date(&d,&t,&y); //<-------------EROR ????
rtc_get_time(&h,&m,&s);
sprintf( buffer,"%02d/%02d/%02d",d,t,y);
lcd_gotoxy(5,0);
lcd_puts(buffer);
sprintf( buffer,"%02d:%02d:%02d",h,m,s);
lcd_gotoxy(5,1);
lcd_puts(buffer);
if((h==3)&&(m==15))
PORTB.0=1;
else
PORTB.0=0;
delay_ms(900);
};
}



Leave a Reply