433 Mhz Data Receiver


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default Manchester

    Hi People,
    i have a question ,can I use this manchester code like in this example.
    Trough PortA.0 is incoming encoded data from my transmitter and is then decoded and trough PortA.1 is going encoded data out.

    Define LOADER_USED 1
    Include "modedefs.bas" ' Mode definitions for Serout

    ADCON1=7
    define osc 4

    DEFINE HSER_RCSTA 90h
    DEFINE HSER_TXSTA 24h
    DEFINE HSER_SPBRG 207 ' 1200 Bauds
    DEFINE HSER_CLOERR 1

    n var byte
    d var byte
    myVar VAR byte
    CounterA var Byte
    ErrorFlag var Bit
    MyData var Byte
    encoded var Word
    v var word

    pause 10 ' safe start-up delay

    Main:

    serin porta.0,N1200,v

    ErrorFlag=0
    For CounterA=0 to 7
    If v.1=0 then
    MyData.7=0
    If v.0=0 then ErrorFlag=1
    else
    MyData.7=1
    If v.0=1 then ErrorFlag=1
    endif
    v=v>>2
    If CounterA<7 then MyData=MyData>1
    next
    goto encodemanchester
    encodeManchester:
    For d=0 TO 7
    IF mydata.0[d]=0 Then
    encoded.0[d*2]=0
    encoded.0[d*2+1]=1
    Else
    encoded.0[d*2]=1
    encoded.0[d*2+1]=0
    EndIF

    serout porta.1,N1200,[encoded]
    hserout [encoded]

    Next

    goto main
    end


    Please for help,thanks very much.

    Pesti.

  2. #2


    Did you find this post helpful? Yes | No

    Default

    Hi,
    Is nobody here that can help me please?

    Regard Pesti.

  3. #3
    Join Date
    Oct 2005
    Posts
    34


    Did you find this post helpful? Yes | No

    Default 433 MHz receiver

    The serin command is used as folow:
    Transmitter code: SerOut GPIO.1,N1200,["A","work"]
    Receiver code: SerIn porta.3,N1200,["A"],B0,B1,B2,B3 received data will be: B0=w, B1=o, B2=r, B3=k
    Note the N1200 is the baud rate, that is very important the N can be replaced with a T depending on the polarity of the data you receive, then the ["A"] the program will wait on the pin porta.3 until it receive an "A" then it will read the data that follow into the 4 variables B0-B3, you can use more variables if you want to.
    But if your transmitter is using a decoder chip it is impossible to read the data you will always get garbage and not real data.
    The data that you receive while the transmitter is off is only garbage or QRM caused by florescent light or other interference.
    To sum up, you will need to know at what baud rate and polarity your transmitter is sending the data and you need to know what the [qualifier] is, it can be any character/s.
    Last edited by ChrisMicro; - 29th November 2010 at 03:03.
    You can't teach an old dog new tricks, but I'm always willing to try.

  4. #4
    Join Date
    Oct 2005
    Posts
    34


    Did you find this post helpful? Yes | No

    Post 433 Mhz Data Receiver

    You can try the following:
    Create some word long variables eg
    B0 var WORD
    B1 var WORD
    B2 var WORD
    B3 var WORD

    SerIn porta.3, N1200,,, B0, B1, B2, B3
    then compare the variables if it contain the same data then it will be the correct code because the encoder/decoder chips send out a 12 bit data that will fit into a word variable that can take up to 16 bits of data
    You can't teach an old dog new tricks, but I'm always willing to try.

Similar Threads

  1. Using Nokia LCD
    By BobP in forum mel PIC BASIC Pro
    Replies: 300
    Last Post: - 3rd May 2018, 05:47
  2. Nokia 3310 display text
    By chai98a in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 26th August 2007, 04:39
  3. Big characters on HD44780 4x20
    By erpalma in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 7th January 2007, 03:21
  4. LCD + bar graph
    By DynamoBen in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 5th October 2005, 15:50
  5. Sinus calculating !
    By Don Mario in forum mel PIC BASIC Pro
    Replies: 29
    Last Post: - 29th November 2004, 00:56

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts