Serial Modifiers


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2008
    Posts
    7

    Default Serial Modifiers

    I cannot seem to find a complete description of the modifiers that can be used for serial communication. For Example the manual shows the following as being allowed:

    {I}{S}BIN{1..16}
    {I}{S}DEC{1..5}
    {I}{S}HEX{1-4}

    Questions:

    What are {I} and {S} and how are these used. Examples?

    Thanks...

    Chris
    Chris Shatara

  2. #2
    Join Date
    Feb 2009
    Location
    Southern California
    Posts
    86


    Did you find this post helpful? Yes | No

    Default

    Under Serout2 they give explanations of the {I} and {S}. My manual has it on page 143. {I} will send an indication character "%" for binary, "#" for decimal and "$" for hex values. {I} will send negative numbers if bit 7 is a one. Google "2s complement" if you don't know how negative values are computed.

    Consider:
    B0 = 16
    Serout [SBIN B0] would send %00010000
    Serout [SDEC B0] would send #16
    Serout [SHEX B0] would send $10

    B0 = 255
    Serout[IDEC B0] would send -1

  3. #3
    Join Date
    Jul 2008
    Posts
    7


    Did you find this post helpful? Yes | No

    Default Serial Modifiers

    That was quite helpful.

    I had looked at the Serout2 writeup but did not read beyond the 1) - 7) explanations.


    ..Thanks...Chris
    Chris Shatara

Similar Threads

  1. Replies: 33
    Last Post: - 19th March 2010, 03:02
  2. Serial Comms through TX/RX pair jumbled
    By altech6983 in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 28th July 2009, 21:04
  3. Dynamic USB Serial Number (PIC18F4550)
    By awmt102 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 16th July 2009, 17:03
  4. PIC18F4680 to PC via MAX232 (RS232 serial) no output
    By opticsteam1 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 14th April 2008, 20:39
  5. interfacing to the pc serial port
    By kelangfei in forum General
    Replies: 4
    Last Post: - 7th October 2007, 22:35

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