well, i tested the first program and doestn works, then I use a LCD (16X2) for view the variable in the Reciever, the lcd show me the number and show me how works my program and i can view that my program is wrong because the data is send time and time again, and before a while the data changes. I mean first put p.e.: 0,0,0,0,0,3,3,3,0,0,0,0 during the switch is off an suposed the lcd put only zeros. and "viceversa"

Then i try to fix the problem but now i doesnt pass anything, i cant recieve or i cant transmitt, i testes the pics and works perfectly, I thought that modules RF had been disturbed, And I connected pics directly and even so it does not pass anything, then I believe that it is my program and at this point already my mind is blocked some help?

here the two codes: (when it worked )

transmitter code:'TX CODIGO TRANSMISOR

INCLUDE "modedefs.bas"

TRISA=6

DATOUT VAR PORTA.0
ONN VAR PORTA.1
OF1 VAR PORTA.2
C VAR BYTE

TX:


IF OF1=1 THEN
C=2
ENDIF



IF ONN=1 THEN
C=5
ENDIF



IF C=2 THEN
SEROUT DATOUT,N1200,[0]
ENDIF

IF C=5 THEN
SEROUT DATOUT,N1200,[7]
ENDIF


GOTO TX



reciever code:'RX CODIGO RECEPTOR

INCLUDE "modedefs.bas"

TRISB=1

DATAIN VAR PORTB.0
LEDVER VAR PORTB.1
DATO VAR WORDS


RX:

SERIN DATAIN,N1200,DATO

IF DATO=0 THEN
LOW LEDVER
ENDIF

IF DATO=7 THEN
HIGH LEDVER
ENDIF

goto rx