transceiver 433 MHz


Closed Thread
Results 1 to 12 of 12
  1. #1
    Join Date
    Feb 2006
    Location
    france
    Posts
    47

    Default transceiver 433 MHz

    Hello

    I want a sample program in pbp, I want to send
    15 bytes by the bias of an RF module 433 MHz and receive
    On another module.

    thank you
    Attached Images Attached Images  

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Have you searched the forum for examples? There a plenty out there.
    Can you send and receive the data with wires?
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Feb 2006
    Location
    france
    Posts
    47


    Did you find this post helpful? Yes | No

    Default rf

    Hello

    I will test this way?

    touche VAR BYTE
    name0 var byte
    name1 var byte
    name2 var byte
    name3 var byte
    i var byte
    ID Var Byte


    envoi:
    SEROUT2 PORTA.3,T9600,["SYN",ID,name0,name1,name2,name3]
    GOTO debut



    reception:
    Serin2 PORTA.3,T9600,[wait("#SYN"),ID,name0,name1,name2,name3]
    GOTO debut

  4. #4
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,810


    Did you find this post helpful? Yes | No

    Default

    Maybe without the "#" symbol on he SERIN command.

    Ioannis

  5. #5
    Join Date
    Feb 2006
    Location
    france
    Posts
    47


    Did you find this post helpful? Yes | No

    Default rf

    Hello
    Thank you for your help, do you have a sample program.
    I want to transmit and receive 24 bytes.
    thank you

  6. #6
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,810


    Did you find this post helpful? Yes | No

    Default

    If your data are always 24, then use an array, load the date at the array elements and then send the array.

    I 'd use Hserout if my controller has hardware USART.

    Hserout [STR array\24]

    or

    SerOut2 port,mode,[STR array\24]

    Ioannis

  7. #7
    Join Date
    Feb 2006
    Location
    france
    Posts
    47


    Did you find this post helpful? Yes | No

    Default rf

    Hello

    Thank you for your help, what do you think of this program?

    Compteur Var Byte '
    TX_Donnee Var Byte[24] ' Donnee emission
    RC_ID Var Byte ' emission IDentificateur
    RX_Donnee Var Byte[24] ' Donnee reception


    Loop: ' emission

    For Compteur = 0 to 23 ' donnee
    TX_Donnee = Compteur ' Transfert de Compteur vers TX_Donnee
    Serout2 PortA.0,B2400,["#OK",RC_ID,TX_Donnee] ' envoie l'ID suivie des donnnees

    Pause 100 '
    Next
    Goto Loop



    Loop1: ' reception


    Serin2 PortA.1,B4800,[wait ("#OK"),RC_ID,RX_Donnee] ' attend reception l'ID
    if ID=32 THEN




    Goto Loop1 ' boucle

  8. #8
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,810


    Did you find this post helpful? Yes | No

    Default

    Sorry but no!

    You lack basic knowledge of the lanquage syntax.

    I am sorry to say that, but you must read the PBP manual and test the commands before doing this.

    Just to help you going, arrays are accessed by their element position, e.g. TX_Donnee = Compteur is wrong and should be TX_Donnee[Compteur] = Compteur.

    Ioannis
    Last edited by Ioannis; - 16th June 2010 at 19:54.

  9. #9
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    You might want to verify your send/receive data rates as well.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  10. #10
    Join Date
    Feb 2006
    Location
    france
    Posts
    47


    Did you find this post helpful? Yes | No

    Default rf

    Hello

    Thank you for your help, I'll try this way?


    j var byte
    datac Var Byte '
    TX_Donnee Var Byte[24] ' Donnee emission
    ID Var Byte ' emission IDentificateur
    RX_Donnee Var Byte[24] ' Donnee reception



    Loop: ' emission

    ID=32 ' l'ID

    For J = 0 to 23 '
    TX_Donnee[J] = datac ' Transfert de datac vers TX_Donnee

    Serout2 PortA.0,B2400,["#OK",ID,TX_Donnee] ' envoie l'ID suivie des donnees
    Pause 100 '
    Next J
    Goto Loop



    Loop1: ' reception


    Serin2 PortA.1,B4800,[wait ("#OK"),ID,RX_Donnee] ' attend reception l'ID suivie des donnees

    if ID=32 THEN

    For j = 0 to 23 '
    datac[J] = RX_Donnee ' Transfert de datac vers TX_Donnee
    next j

    Goto Loop1 ' boucle

  11. #11
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,810


    Did you find this post helpful? Yes | No

    Default

    No, you receive loop is wrong in the logic.

    Try this for the receive part:

    Code:
    j=0
    
    While j<24' reception
      
        Serin2 PortA.1,B4800,[wait ("#OK"),ID,RX_Donnee] ' attend reception l'ID suivie des donnees
    	
        if ID=32 THEN
            datac[J] = RX_Donnee           ' Transfert de datac vers TX_Donnee
            j=j+1
         endif
    Wend					                        ' boucle

  12. #12
    Join Date
    Feb 2006
    Location
    france
    Posts
    47


    Did you find this post helpful? Yes | No

    Default rf

    hello

    thank you for your help

Members who have read this thread : 1

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