HSERIN vs Serin2


Closed Thread
Results 1 to 7 of 7

Hybrid View

  1. #1
    Join Date
    Feb 2005
    Location
    Essex, UK
    Posts
    94


    Did you find this post helpful? Yes | No

    Default

    Thanks for the replies.

    I have tried the HSERIN with both square brackets and parentheses but neither way works unfortunately. It seems very strange to me that the HSERIN will not work with the data I am trying to receive (I have used it a fair few times in the past with no problems). It seems to be set up the same way as the SERIN2 i.e. 9600 baud, no parity bit, 8 data bits, 1 stop bit and the SERIN2 is receiving in True form.

    Any other pointers please?

    Cheers

    Rob

    P.S. I am using the round brackets because of post #2 here by Darrel:
    Post #2

  2. #2
    Join Date
    Feb 2005
    Location
    Essex, UK
    Posts
    94


    Did you find this post helpful? Yes | No

    Default

    Hmmmm,

    some more testing shows that:

    Code:
    hserin [wait ($FD)]
    allows the program to continue whereas

    Code:
    hserin [wait ($FD), dec databyte(0)]
    does not.

    However, if I put my original string in but with the DEC modifier removed, the code works fine:

    Code:
    hserin [wait ($FD), databyte(0), databyte(1), databyte(2), databyte(3), databyte(4), databyte(5)]
    I have also tried the HEX modifier but again this prevents the code from progressing. Very strange
    Last edited by Rob; - 13th February 2008 at 10:47. Reason: Gramatical error

  3. #3


    Did you find this post helpful? Yes | No

    Default

    Rob-

    I think that you have to specify the no of decimal digits to be output ie

    DEC 3 Databyte(0) will print databyte(0) with 3 decimal digits and leading zeroes

    regards

    Angus Anderson

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Angus Anderson View Post
    Rob-
    I think that you have to specify the no of decimal digits to be output ie
    DEC 3 Databyte(0) will print databyte(0) with 3 decimal digits and leading zeroes
    regards
    Angus Anderson
    Not only that, but I think the DEC modifier kicks out the value (i.e. dies a horrible death ) if a non DEC capable value tries to get passed to the variable.

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. Getting SERIN2 to work?
    By BobPigford in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 22nd July 2009, 20:10
  3. Should I use serin2 or HSERIN?
    By TonyA in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 20th April 2007, 16:05
  4. SERIN2 digit parsing
    By skimask in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 7th January 2007, 23:15
  5. Hserin not working...
    By robert0 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 22nd August 2005, 12:25

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