Can anyone help...

I am trying to get a 12F675 to respond to a serial in command. I am transmitting data to a servo serial controller using a 16F877a....that works fine. The 16f887a converts analog joystick movement into Mini SC protocal commands (255, motor #, XXX).....at the same time I have a 12F675 attached to the serial in line. If a switch is activated on the 16F877a it generates an additional command ...."L", 255 or "L",50 to tell the 12F675 to set GPIO 1 and 2 high or low depneding on the value (used to activate optos for a lights on and off). The 12F675 is running an external Crystal (20MHz) and the code is below....can't figure out why it does not respond....any ideas????


#CONFIG
ifdef PM_USED
device pic12F675, hs_OSC, extrc_osc_clkout, wdt_on, mclr_on, protect_off
else
__config _HS_OSC & _EXTRC_OSC_CLKOUT & _WDT_ON & _MCLRE_ON & _CP_OFF
endif
#ENDCONFIG

Include "modedefs.bas"
define OSC 20

Baud Con 84
bob Var GPIO.0
B0 Var BYTE
lightpos var byte
lightval var byte
ANSEL = 0 ' disable A/D converter
CMCON = 7 ' disable comparators
TRISIO = %100000
lightval =0 'set light val
lightpos = 0 'set light position to off
Main:
Serin bob, baud,B0,lightval
if B0 = "L" Then
if lightval = 255 and lightpos = 0 then
high GPIO.1
High GPIO.2
lightpos = 1
elseif lightval =50 and lightpos =1 then
low GPIO.1
Low GPIO.2
lightpos =0
ENDIF
Endif
Goto Main