HSERIN 5 bytes from PC


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2008
    Posts
    66

    Question HSERIN 5 bytes from PC

    How do I receive 5 bytes in 1 packet send from PC serial port?

    From C code in PC,

    BYTE data_out[10]
    data_out[0]=1
    data_out[1]=2
    data_out[2]=3
    data_out[3]=4
    data_out[4]=5
    serial.Write(data_out,5)

    Using the following, I can't seem to get it to work. if send and receive 1 byte, then it is ok. The baud rate setting is correct.

    Code:
    data_in var byte[10]
    HSERIN [DEC5 data_in]
    I'm using DT serial interrupt.
    Pls help.

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

    Default

    HSERIN [data_in\5]
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Aug 2008
    Posts
    66

    Default

    Thanks for the solution.

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

    Default

    Quote Originally Posted by Pic2008 View Post
    Thanks for the solution.
    It really worked?
    Dave
    Always wear safety glasses while programming.

Similar Threads

  1. PICs can do more if use others than delays instructions
    By hardcore in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 24th February 2010, 19:52
  2. HSERIN & Interupts (aka controlling PIC programs from a remote PC)
    By HankMcSpank in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 17th June 2009, 14:46
  3. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30
  4. HserIn and Interrupts
    By rwskinner in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 5th December 2006, 07:15
  5. Replies: 11
    Last Post: - 13th July 2005, 19:26

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