fateme.m
Newbie level 5
it is my program but unfortunately timer is not unable
without any error
please help me
void interrupt() {
cnt++ ;
PIR1.TMR1IF = 0;
TMR1H = 0x80;
TMR1L = 0x00;
}
void main() {
ANSEL = 0;
ANSELH = 0;
PORTB = 0xF0;
TRISB = 0;
T1CON = 1;
PIR1.TMR1IF = 0;
TMR1H = 0x80;
TMR1L = 0x00;
PIE1.TMR1IE = 1;
cnt = 0;
INTCON = 0xC0;
do {
if (cnt == 76) {
PORTB = ~PORTB;
cnt = 0;
}
} while (1);
}
without any error
please help me
void interrupt() {
cnt++ ;
PIR1.TMR1IF = 0;
TMR1H = 0x80;
TMR1L = 0x00;
}
void main() {
ANSEL = 0;
ANSELH = 0;
PORTB = 0xF0;
TRISB = 0;
T1CON = 1;
PIR1.TMR1IF = 0;
TMR1H = 0x80;
TMR1L = 0x00;
PIE1.TMR1IE = 1;
cnt = 0;
INTCON = 0xC0;
do {
if (cnt == 76) {
PORTB = ~PORTB;
cnt = 0;
}
} while (1);
}