Hi Ralph,
Done. Works perfectly.
Receiving on 18F452
DEFINE OSC 20
DEFINE LOADER_USED 1
myVar VAR byte[32]
BEGIN:
SERIN2 PORTB.0,16468,1000,TIME_OUT,[STR myVar\32\13]
HSEROUT [STR myVar\32,13,10] ' Display result
CLEAR ' Clear array
GOTO BEGIN
TIME_OUT:
HSEROUT ["Time Out",13,10] ' Indicate timeout
GOTO BEGIN
Sending with 16F876A
DEFINE OSC 20
DEFINE LOADER_USED 1
BEGIN:
SEROUT2 PORTB.0,16468,["-- Hello there this is a test --",13]
PAUSE 1000
GOTO BEGIN
18F452 connected to PC serial port returns the following in MCS+ terminal program: -- Hello there this is a test --
Dissconnect 16F876A from 18F452 serial input, ground 18F RB0, returns Time Out. Float or take RB0 HIGH, sit & spin in the SERIN2 line.
Tried similar routines via RF. Still works flawlessly. Tossed in a few bytes to DC balance the receiver data-slicer, but I get similar good results.
Ran same tests with the WAIT modifier. Same results.
' RX
DEFINE OSC 20
DEFINE LOADER_USED 1
myVar VAR byte[32]
BEGIN:
SERIN2 PORTB.0,16468,1000,TIME_OUT,[WAIT("X"),STR myVar\32\13]
HSEROUT [STR myVar\32,13,10]
CLEAR ' Clear array
GOTO BEGIN
TIME_OUT:
HSEROUT ["Time Out",13,10]
GOTO BEGIN
' TX
DEFINE OSC 20
DEFINE LOADER_USED 1
BEGIN:
SEROUT2 PORTB.0,16468,["X-- Hello there this is a test --",13]
PAUSE 1000
GOTO BEGIN
I suspect something else may be causing your headaches.
Bookmarks