Gday Melanie
Thks for the reponse but I think the problem is a bit deeper.
Ps i am running at 2400baud

My serial LCD controller has a switchable data inverter and i was using my Pic in True mode to match what it was set at.
In this mode it worked until i tried to set another pin on the Pic, in which case it started to fail again. This was intermittent, but i have now traced it back to if there is a pause after the pin is set.
I swapped the LCD mode and then drove inverted from the Pic and it worked perfectly under all circumstances.
Next i stuck a CRO on the serout pin to see what was happening.
When just doing a serout, in True mode, the trace defaults to high and pulls low on data.
In Inverted mode it defaults to low and pulls high on data.
After any other pin is set, and then followed by a pause, the serout pin is actively pulled low during the pause time.
This occurs in both modes, hence resulting in the LCD going haywire in true mode, as it should be pulled high in this case.
I then thought i'd be sneaky, and if in true mode, manually force the serout pin high just before i set the other pins, to keep it high until the next serout. ie
GPIO.1 = 1 <- serout pin
GPIO.4 = 0
GPIO.5 = 0
to my dismay, after the last line, GPIO.1 appears to have been pulled low again, and it fails as per usual
then i tried
GPIO.4 = 0
GPIO.5 = 0
GPIO.1 = 1
and this works like a charm, with GPIO.1 staying high
I now know how to fix it but i think there is some wrong logic going on somewhere when the serout mode is true.

Andrew

test program used as per below
failure is when pot is roughly centred, comes good each side of centre
--------------------------------------------------------------------------------------------
DEFINE ADC_BITS 10 ' Set number of bits in result
DEFINE ADC_CLOCK 3 ' Set clock source (rc = 3)
DEFINE ADC_SAMPLEUS 50 ' Set sampling time in microseconds
serpin con 1 ' lcd output pin
sermode con 0 ' output mode driven true, fails after any pin is set???
'sermode con 4 ' output mode driven inverted

XVal var word
ADCON0 = %10000001 ' Configure and turn on A/D Module:
' Right justify result, use Vdd pin, channel 0
TRISIO = %00000001 '

init: 'initialise LCD
pause 1000 ' wait for lcd to start
SerOut serpin, sermode, [ $FE, 1 ] 'clear screen 2x to setup
pause 100
SerOut serpin, sermode, [ $FE, 1 ]
pause 100
start:
ADCIN 0, XVal
pause 250
loopret:
if ( XVal > 470 ) and ( XVal < 550 ) then
GPIO.1 = 1 ' if this is uncommented it fails
GPIO.4 = 0
GPIO.5 = 0
' GPIO.1 = 1 ' if this is uncommented it works
endif
pause 750
SerOut serpin, sermode, [ $FE, 2, #Xval, " " ] 'Display the decimal value
goto start
end