PA3040
Advanced Member level 3
Dear All
My MCU is 16f877a
I am starting to design a clock using timer1 external oscillator ( clock crystal 32678Hz ) but it dose not work with Proteus
then I changed to internal oscillator, then it is working fine
Please help
Thanks in advance
My MCU is 16f877a
I am starting to design a clock using timer1 external oscillator ( clock crystal 32678Hz ) but it dose not work with Proteus
then I changed to internal oscillator, then it is working fine
Please help
Thanks in advance
Code:
main(){
lcd_init();
TMR1L = 0;
TMR1H = 0;
TRISB = 0;
TRISC = 0;
TRISD = 0;
TMR1IF = 0;
T1CON = 0b00001000;
TMR1ON = 1;
while(1){
while(!TMR1IF){
lcddata(Segment[j]);
j++;
}
lcdcmd(0xc0);
lcddata(Segment[j]);
j++;
}
}
Last edited: