I know there is a simple solution for this, but I can not find it.
I have two 16F676 both running on external 4Mhz oscillators. A TXM-433-LR-S and a RXM-433-LR-S.
I know the RF is working as I can send a "HIGH" and receive a "HIGH" and blink a LED.
I know the serial works, send a signal and blink a LED.
Problem is when serial is sent with RF.
I am using hyper-terminal to monitor the receiver. With wires I will see what I send and with out wires the first few characters will be garbage with the remaining correct.
So I only want the last one.Code:SERIN2 PORTC.4,16468,[WAIT("9"),DEC net]
SendReceiveCode:DEFINE OSC 4 Asm ERRORLEVEL -306 Endasm include "modedefs.bas" ANSEL=%00000000 CMCON=7 PAUSE 2000 LOOP: IF PORTC.1 = 1 THEN SEROUT2 PORTC.4,16468,[DEC 01010101,DEC 9,DEC 3,10,13] HIGH PORTC.5 PAUSE 100 LOW PORTC.5 PAUSE 100 ELSE SEROUT2 PORTC.4,16468,[DEC 010101,DEC 9,DEC 5,10,13] PAUSE 200 ENDIF GOTO LOOP END
The last few characters are always the same with or with out wires on hyper-terminal.Code:DEFINE OSC 20 Asm ERRORLEVEL -306 Endasm include "modedefs.bas" ANSEL=%00000000 CMCON=7 net VAR WORD PAUSE 2000 LOOP: SERIN2 PORTC.4,16468,[WAIT("9"),DEC net] IF net = 3 THEN HIGH PORTC.5 PAUSE 100 LOW PORTC.5 PAUSE 100 ELSE LOW PORTC.5 PAUSE 200 ENDIF GOTO LOOP END
Why is the WAIT not working with RF.
Tried different bauds, nothing.
Tried different preambles, nothing.





Bookmarks