I want to know how to make this program run more than one time, I've been tryng using "for" and while but it didn't work. This is the program normal program:
C-like:
void main(void) {
TRISD = 0;
PORTD = 0;
while(1) {
PORTD = 0b00000001
while(!RD5){
PORTD = PORTD << 1;
__delay_ms(100);
}
__delay_ms(500);
while(!RB0){
PORTD = PORTD >> 1;
__delay_ms(100);
}
}
return;
}
Last edited by a moderator: