Thanks Charles, I haven't had time to run a test but maybe I've spotted my problem whilst checking your code.
IF PortValue = 4 THEN
HSEROUT [10,13,"Port A4 is Open Collector!",13,10]
ENDIF
ADCON1 = $FF
TRISA.0(PortValue)= 0 'Make it an output
PauseUs 20
PORTA.0(PortValue) = 0 'Write a '0'
GOTO StateCheck
ENDIF
My understanding, according to the code, is that I should use round brackets not square brackets as I misunderstood? JEC's code to show???? I'll try and see if it works![]()




Bookmarks