thank you.
I will test with your code or similar, but i dont understand the syncrho data. the transmitter and recivier works with asyncronous data too.
thank you.
I will test with your code or similar, but i dont understand the syncrho data. the transmitter and recivier works with asyncronous data too.
RECEIVER SIDECode:SEROUT SerPin,BAUD,["UUUUUSYNCHRO",YourByte]
Or a variant of it.Code:SERIN2 SerPin,BAUD,[WAIT ("SYNCHRO"),YourByte]
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
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
Hola, mi cabeza ya de plano tiene muchos golpes, como volví hacer todo, hagamos de cuenta que no uso los modulos rf, ahora solo comunico los pics con un cable directamente, pero no me sale nada. se supone que con un switch mando un dato para prender un led y si esta cerrado mando otro para apagarlo y no lo hace. ya revise los pics y si funcionan, ya me canse de cambiar el programa y nada la verdad ya no se que hacer. les juro que ya me duele la cabeza de estar piense y piense y nada mas no me queda. he hecho otros programas pero este en particular como me ha dado dolores de cabeza
alguna ayuda aqui los codigos:
'TX CODIGO TRANSMISOR
INCLUDE "MODEDEFS.BAS"
TRISA=1
BOTON VAR PORTA.0
VIATX VAR PORTA.1
LEDVE VAR PORTA.2
LEDRO VAR PORTA.3
pause 500
TX:
IF BOTON=1 THEN
GOSUB SEND1
ENDIF
IF BOTON=0 THEN
GOSUB SEND2
ENDIF
GOTO TX
SEND1:
SEROUT VIATX,N9600,[7]
LOW LEDRO
HIGH LEDVE
RETURN
SEND2:
SEROUT VIATX,N9600,[0]
LOW LEDVE
HIGH LEDRO
RETURN
.............................................
' RX CODIGO RECEPTOR
INCLUDE "MODEDEFS.BAS"
TRISB=1
VIARX VAR PORTB.0
LEDRO VAR PORTB.1
LEDVE VAR PORTB.2
DATO VAR BYTE
RX:
SERIN VIARX,N9600,DATO
IF DATO=0 THEN
HIGH LEDVE
LOW LEDRO
ENDIF
IF DATO=7 THEN
LOW LEDVE
HIGH LEDRO
ENDIF
GOTO RX:
.......................................
ya no puedo mas estoy frito alguna ayuda porfavor
Bookmarks