Buenas tardes foreros
Estoy haciendo mis primeras pruebas con el CCS PHWD compiler 4.104
Mi programa es este:
#INCLUDE <16F877.h>
#FUSES XT,NOWDT
#use delay(clock= 400000)
#BYTE TRISB= 0x86
#BYTE PORTB= 0x06
#BYTE OPTION_REG= 0x81
void main(){
int16 seg=1000;
bit_clear(OPTION_REG,7);
bit_set(TRISB,0);
bit_clear(TRISB,1);
bit_clear(PORTB,1);
while (1){
if (bit_test(portb,0) == 1)
bit_clear(portb,1);
delay_ms (seg);
bit_set(portb,1);
delay_ms (seg);
bit_clear(portb,1);
else //linea 20
bit_set(portb,1);
}
}
Me aparece este error: A numeric expression must appear here. En la linea 20
Desde ya, muchas gracias por sus consejos.