Serin/Out for multiple bytes


Closed Thread
Results 1 to 2 of 2
  1. #1
    mankan's Avatar
    mankan Guest

    Default Serin/Out for multiple bytes

    Dear All,

    I would like to send multiple bytes using serout and receive the same using serin.

    Could you please let me know to do that. Any example will be really great.

    Thanks,
    Mankan

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Code:
    '    ---------------------------------[ Transmitter ]---------------------------------------
    Byte1   var byte
    Byte2   var byte
    Byte3   var byte
    Byte4   var byte
    
    Serout Serpin,Baud,[byte1,byte2,byte3,byte4]
    
    '    ---------------------------------[ Receiver ]------------------------------------------
    Byte1   var byte
    Byte2   var byte
    Byte3   var byte
    Byte4   var byte
    
    Serin serpin,Baud,[byte1,byte2,byte3,byte4]
    OR
    Code:
    '    ---------------------------------[ Transmitter ]---------------------------------------
    MultipleBytes         var byte[4]
    
    Multiplebytes[0]=0
    Multiplebytes[0]=1
    Multiplebytes[0]=2
    Multiplebytes[0]=3
    
    Serout2 Serpin,Baud,[str multiplebytes]
    
    
    '    ---------------------------------[ Receiver ]------------------------------------------
    MultipleBytes         var byte[4]
    
    Serin2 Serpin,Baud,[str multiplebytes\4]
    Last edited by mister_e; - 5th June 2006 at 20:00.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. Bits, Bytes Words and Arrays
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 24
    Last Post: - 14th June 2016, 07:55
  2. Replies: 9
    Last Post: - 11th February 2010, 21:32
  3. LP Instant Interrupts Error
    By Kamikaze47 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 7th December 2009, 09:13
  4. bytes compressed and encrypted
    By RAYMON in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 3rd March 2009, 11:24
  5. Replies: 8
    Last Post: - 22nd April 2008, 04:11

Members who have read this thread : 2

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