Serout2 question


Results 1 to 12 of 12

Threaded View

  1. #4
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,170

    Default Re: Serout2 question

    The command send all at once. No commas are inserted if you do not explicitly define so.

    The command will send the text string and immediately after that will send the MyValue not as one binary byte but as 1 up to 3 ASCII codes of the value.

    Example 1. If MyValue is 5, the command as you stated will send

    This is my value:5crlf

    The above expressed in ASCII codes will be

    Code:
    $54 $68 $69 $73 $20 $69 $73 $20 $6d $79 $20 $76 $61 $6c $75 $65 $3a $35 $0d $0a
     T   h   i   s       i   s        m   y      v   a   l   u   e   :   5   CR   LF
    Example 2. If MyValue is 123 then you send out

    This is my value:123crlf

    or expressed in ASCII codes

    Code:
    $54 $68 $69 $73 $20 $69 $73 $20 $6d $79 $20 $76 $61 $6c $75 $65 $3a $31 $32 $33 $0d $0a
     T   h   i   s       i   s        m   y      v   a   l   u   e   :   1   2   3   CR   LF
    I think you have not used correctly ascii and binary values. Hope the above clears things for you.

    Ioannis
    Last edited by Ioannis; - 14th March 2024 at 22:13.

Similar Threads

  1. SEROUT2 Question ?
    By andybarrett1 in forum Serial
    Replies: 2
    Last Post: - 12th April 2015, 23:49
  2. Serin2/Serout2 Question
    By scottl in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 18th November 2007, 10:11
  3. Serout2
    By Mostafa in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 5th April 2007, 08:37
  4. serout2
    By jcleaver in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 13th February 2007, 00:51
  5. serout2 help please...
    By cpayne in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 3rd March 2006, 20:37

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