Hi all
Could somebody please help the code on the receiver side , in other words to decode this ?
the reaosn I am sasking is because I have the very same system at home and would like to add my little PIC project as a receiver to it.
Here's what I thought would work so far ....
And that's where I'm stuck :-(Code:'**************************************************************** DEFINE OSC 20 T CON 350 ' T = 350uS T3 CON 1050 ' 3T T32 CON 11200 ' 32T (Stop/Synch) D_PACKET VAR WORD ' Holds 12-bit data packet to send INDEX VAR BYTE ' Data packet bit index pointer LOOPS VAR BYTE ' Loop counter RX VAR word ' Connects to TX receiver data in RXPORT VAR portb.0 RFCOUNT VAR byte[2] 'possibly be needing this BITCOUNT var byte ' count number of bits received MARKER var byte 'check pauses or spaces of incoming pulse receive: LOW RX ' RX output idles low for RF carrier OFF DEFINE PULSIN_MAX 11200 '>11200 RETURNS 0 PulsIn RXPORT,1,RX 'receive pulse on portb.0 and hold in RX If (RX<11200) Then receive 'pulse is too short or > pulsin max try again While RXPORT=0:Wend 'wait pulse
What is the next thing to look for ? T or T3 and how would the code look ?
Do I use a WHILE loop ?
Should I be adding a REPEAT UNTIL ?
I imagine a counter condition needed as well until we reach 12 bits
Should I even be using pulsin or not ?
Any help would be greatly appreciated.
Kind regards
Dennis




Bookmarks