WAIT is a reserved word. It belong to some Serial communication command such as SERIN2, DEBUGIN and HSERIN.
There's a list of reserved word in your manual.
Usually, wen you define LAbel, you should add a colon after it.
Code:
TRISB = %11111111 'PORT B ALL INPUTS
TRISA = %00000000 'PORT A ALL OUTPUTS
WaitingForSomething:
IF PORTB.3 = 1 THEN TIMEON 'WAIT UNTIL INPUT PULSE ARRIVES
GOTO WaitingForSomething 'LOOP BACK TO WAIT
TIMEON:
HIGH PORTA.1 'PULSE ARRIVED AT PIN 4 SET PIN 9
PAUSE 10 'PAUSE FOR 10 msec
LOW PORTA.1 'SET PORT A BACK TO LOW
GOTO WaitingForSomething 'RETURN BACK TO WAIT
HTH
Last edited by mister_e; - 7th June 2008 at 23:52.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks