Ok... been reading and studying like a bat outta hell..
Dave ...Thanks a million !
So while the error prevails ...
Do you have any code snippets I could try to start testing the RF portion be it SERIN/DEBUG/HSERIN etc.
Perhaps I will find the error in the code while I am experimenting :-)
Kind regards
Dennis
and now for the next step
Hi Dave
I still haven't solved the number 3 problem
Where should I place the DEC keyword in ? As I try to compile with DEC keyword in, MCS spits out compile errors.
I am using TLP-434 and RLP-434 modules.
With this in mind would you suggext I now start adding in manchester encoding ?
Should I be trying SERIN/OUT2, DEBUG and HSER first ? (these all worked well when the PIC's were wired together)
I see your lines of serin code pre-condition the receiver first, should i be sending more $55's ?
As always any help or suggestions,tips,tricks etc would be greatly appreciated.
Kind regards
Dennis
IT WORKS better than before :-)
Dave :-)
It's working like a charm :-)....I think, just getting an
extra character on every second line :-)
Range is awesome in the house, reaches all distant corners
--will do range tests tomorrow and feedback to you.
Here's the OLD code
Which worked but wasn't too accurate
TX CODE
Code:
TRAIN VAR BYTE
TRAIN=$55
hSEROUT [TRAIN,TRAIN,TRAIN,TRAIN,TRAIN,"9",dec 3,$d,$a]
RX code
Code:
HSERIN [WAIT("9"),DEC NET]
HSERout ["I Recived this number ",DEC NET,$d,$a] 'net var
value should show in hyperterminal
Heres the NEW TX code
USING HSER
Code:
DEFINE HSER_RCSTA 90h ' Enable serial port & continuous
receive
DEFINE HSER_TXSTA 20h ' Enable transmit, BRGH = 0
DEFINE HSER_SPBRG 207 ' 2400 Baud @ 32MHz, 0.17%
DEFINE HSER_CLROERR 1 ' Clear overflow automatically
test:
TRAIN VAR BYTE
train = $B3
SYNK VAR BYTE
SYNK = $7E
hserout [TRAIN,SYNK,DEC 23]
goto test
and the RX code:
Code:
DEFINE HSER_RCSTA 90h ' Enable serial port & continuous
receive
DEFINE HSER_TXSTA 20h ' Enable transmit, BRGH = 0
DEFINE HSER_SPBRG 207 ' 2400 Baud @ 32MHz, 0.17%
DEFINE HSER_CLROERR 1 ' Clear overflow automatically
test:
high led
hserin [WAIT(SYNK), DEC net]
toggle LED
HSERout ["I Recived this number ",DEC NET,$d,$a] 'net var
value should show in hyperterminal
goto test
Here's my receiver output from MCS serial tool window
Code:
I Recived this number 2
I Recived this number 23
I Recived this number 2
I Recived this number 23
I Recived this number 2
I Recived this number 23
As you can see I'm receiving DEC 2 and 23.
Where is the number 2 coming from ?
Eerie ?
Now all I need to do is akind of checksum for example, if
the number 23 is received 3 times then it's a VALID TX.
Any more optimizations or tweaks I should try ?
Thanks a million
Kind regards
(From a very happy:-))
Dennis