Gerd
- 7th June 2008, 23:44
Could somebody point out to me what is wrong with my code?
I don't know where I went wrong.
__________________________________________________ __________________________
TRISB = %11111111 'PORT B ALL INPUTS
TRISA = %00000000 'PORT A ALL OUTPUTS
WAIT IF PORTB.3 = 1 THEN TIMEON 'WAIT UNTIL INPUT PULSE ARRIVES
ENDIF
GOTO WAIT 'LOOP BACK TO WAIT
TIMEON HIGH PORTA.1 'PULSE ARRIVED AT PIN 4 SET PIN 9
'HIGH
PAUSE 10 'PAUSE FOR 10 msec
LOW PORTA.1 'SET PORT A BACK TO LOW
GOTO WAIT 'RETURN BACK TO WAIT
__________________________________________________ _________________________
All this programm does it takes a pulse in on port b pin 3 and sets an output
port a pin 1 high for an extended time of 10mS (the input is only 50uS wide)
The syntax error starts at the lable 'WAIT' and goes all the way down to the end.
I have not worked with PBP for a while and in the past I used the DOS version and
I had no problems with it.
I don't know where I went wrong.
__________________________________________________ __________________________
TRISB = %11111111 'PORT B ALL INPUTS
TRISA = %00000000 'PORT A ALL OUTPUTS
WAIT IF PORTB.3 = 1 THEN TIMEON 'WAIT UNTIL INPUT PULSE ARRIVES
ENDIF
GOTO WAIT 'LOOP BACK TO WAIT
TIMEON HIGH PORTA.1 'PULSE ARRIVED AT PIN 4 SET PIN 9
'HIGH
PAUSE 10 'PAUSE FOR 10 msec
LOW PORTA.1 'SET PORT A BACK TO LOW
GOTO WAIT 'RETURN BACK TO WAIT
__________________________________________________ _________________________
All this programm does it takes a pulse in on port b pin 3 and sets an output
port a pin 1 high for an extended time of 10mS (the input is only 50uS wide)
The syntax error starts at the lable 'WAIT' and goes all the way down to the end.
I have not worked with PBP for a while and in the past I used the DOS version and
I had no problems with it.