Differnet results each time...


Anyway I have finally got the TX/RX to work !

Heres the section of the TX code which works:

IF USBBufferIn[7]=239 then
SEROUT PORTC.0,T2400,[USBBUFFERIN[7]]
gosub DoLow
USBBufferin[7]=0

if USBBufferIn[1]<>0 then
SEROUT PORTC.0,T2400,[USBBufferIn[1]]
gosub DoLow
USBBufferIn[1]=0
endif
USBService
if USBBufferIn[2]<>0 then
SEROUT PORTC.0,T2400,[USBBufferIn[2]]
gosub DoLow
USBBufferIn[2]=0
endif
USBService
if USBBufferIn[3]<>0 then
SEROUT PORTC.0,T2400,[USBBufferIn[3]]
gosub DoLow
USBBufferin[3]=0
endif
USBService
if USBBufferIn[4]<>0 then
SEROUT PORTC.0,T2400,[USBBufferIn[4]]
gosub DoLow
USBBufferin[4]=0
endif
USBService
if USBBufferIn[5]<>0 then
SEROUT PORTC.0,T2400,[USBBufferIn[5]]
gosub DoLow
USBBufferin[5]=0
endif
USBService
if USBBufferIn[6]<>0 then
SEROUT PORTC.0,T2400,[USBBufferIn[6]]
gosub DoLow
USBBufferin[6]=0
endif
USBService
endif

gosub dousbin


goto start

DoLow:
USBSERVICE
PAUSE 65
USBSERVICE
return

Notes:
1. You need to use the T mode if you are directly connecting PIC's.
2. Notice the Pause 65 - It now works great with a longer delay...and has no effect on the USB connection.


Heres part of the modified RX code :

DEFINE HSER_CLROERR 1 ' Clear overflow automatically
Define HSER_RCSTA 90h
Define HSER_BAUD 2400

The oscillator is set to 20Mhz in both cases using : DEFINE OSC 20
__________________________________________________ _______________

Now that the wired link is working....I checked it using a FSK TX/RX pair
and the problems are endless....
Completely random characters etc
Characters appear when i move my hand in the air !
I have tried a passive Bandpass filter around 2400hz but it doesnt sove the problem...
I have connected a Schottky TTL gate to the DataOut...for maintaining proper level transitions...
Also when I connect a LED to the DataOut of the RX it keeps flickering at a fast rate (around 10kz on the oscilloscope),even when the Tx is off...which is probably whats causing the errors..

Any ideas on how to fix this ? or is the RF module faulty ?