5 min = ? sec
----YOUR CODE------
#include <16f84a.h>
#fuses Hs,NOWDT,NOPROTECT <----if you use a 4Mhz cristal, its XT
#use delay(clock=4000000)
#byte PORTA = 5
#byte PORTB = 6
#include <DS1302a.c> <------in my ccs, this driver doesn't exist!!!
main(void)
{
char x,y,z; <-------------- try a 'int' or 'byte' variable
rtc_init();
rtc_set_datetime(8,9,9,5,0,0);
portb=0;
SET_TRIS_B(0);
for(;
;
{
rtc_get_time(x, y, z);
if(y = 00) output_high(PIN_B0);
else
output_low(PIN_B0);
}
}
----------------
I have no sure, but try this code modifyed, and connect 8 leds at port_b and verify if they blink....
#include <16f84a.h>
#fuses XT,NOWDT,NOPROTECT
#use delay(clock=4000000)
#byte PORTA = 5
#byte PORTB = 6
#include <ds1302.c>
main(void)
{
byte x,y,z;
rtc_init();
rtc_set_datetime(8,9,9,5,0,0);
portb=0;
SET_TRIS_B(0);
while(TRUE)
{
rtc_get_time(x, y, z);
output_b
;
delay_ms(500)
}
}