i am asked to create a timer from 0 - 2 using pic16f84a and two 7 seg bcd..
the codes in micro c are as follow
now, im looking for a simpler code than above...
any help!!!
thank you!!
the codes in micro c are as follow
Rich (BB code):
void main(){
char x;
char y;
PORTA=0;
PORTB=0;
TRISA=0;
TRISB=0;
for (;;){
for (y=0;y<3;y++){
PORTA=y;
for (x=0;x<10;x++){
PORTB=x;
delay_ms(200);
if (y==2&&x==4){
PORTA=0;
PORTB=0;
for (x=0;x<10;x++){
}
}
}
}
}
}
any help!!!
thank you!!
Attachments
-
13.7 KB Views: 13
Last edited by a moderator: