SerIn2 ASCII Conversion


Closed Thread
Results 1 to 13 of 13

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Hi Richard,

    For statements that use square brackets for the parameters, like HSERIN ... The array elements must use Round brackets. Otherwise PBP gets a bit confused.
    And the 13,10 on the end isn't needed. They'll be ignored on the next WAIT.
    Code:
    HSerIn Timeout,Receive,[WAIT(":"),DEC2 BufRX(0),DEC2 BufRX(1),DEC2 BufRX(2), _
                                      DEC2 BufRX(3),DEC2 BufRX(4),DEC2 BufRX(5)]
    Or, you could do it this way. Not better, just different ...
    Code:
    FieldCount  VAR byte
    
    HSerIn Timeout,Receive,[WAIT(":")]
    For FieldCount = 0 to 5
        HSerIn Timeout,Receive,[DEC2 BufRX(FieldCount)]
    Next FieldCount
    DT

  2. #2
    Join Date
    Oct 2005
    Posts
    74


    Did you find this post helpful? Yes | No

    Default

    The DEC2 should also be HEX2. Thanks for the tip on the brackets. Didn't remember that.

    Anyone remember how to change parity at runtime, not using a define?

  3. #3
    Join Date
    Oct 2005
    Posts
    74


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by rwskinner View Post
    The DEC2 should also be HEX2. Thanks for the tip on the brackets. Didn't remember that.

    Anyone remember how to change parity at runtime, not using a define?
    That whole deal went way too easy.

Similar Threads

  1. GPS $GPRMC to PIC16F684. Need help with SERIN2
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 27th November 2009, 09:47
  2. ASCII to Long conversion
    By TerdRatchett in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 5th March 2009, 23:43
  3. ascii conversion help needed
    By muddy0409 in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 13th January 2007, 06:33
  4. Hanging on SERIN2 - SOLVED!
    By blainecf in forum Serial
    Replies: 1
    Last Post: - 13th July 2006, 17:55
  5. Conversion of 10-bit word into ASCII
    By Barry Johnson in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 16th January 2005, 14: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