Hserin amount


Closed Thread
Results 1 to 4 of 4

Thread: Hserin amount

  1. #1
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425

    Default Hserin amount

    I've found some threads that confirm the problem I'm having but none that provide a resolution.

    Why doesn't this work:

    HSERIN 1, [STR DAT\800\"@"]

    But this does?

    HSERIN 1, [STR DAT\255\"@"]

    Is the maximum input for an array 255? The only way I can make it work right now is:

    HSERIN 1, [STR DAT1\255\"@", STR DAT2\255\"@", STR DAT3\255\"@", STR DAT4\255\"@"]

  2. #2
    Join Date
    Sep 2009
    Posts
    737


    Did you find this post helpful? Yes | No

    Default Re: Hserin amount

    I use this code to receive string longer then 255 chars
    Code:
    FOR i=0 TO 799
    HSEERIN 1, TimeOutLabel,[Chr] ' get char
    IF Chr="@" THEN 
     GOTO Done 'End of data
    ELSE
     DAT[i]=Chr ' put char in array
    ENDIF
    NEXT i
    Done:
    DAT[i]=0 'End of string

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: Hserin amount

    Make sure you declare variables that will be over 255 as words, also assume you have a typo in the above code "HSEERIN".

  4. #4
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: Hserin amount

    Because the serial buffer is one byte. HSERIN looks at the one byte buffer received.
    The idea is to cycle the rest of your program between bytes.

Similar Threads

  1. Replies: 4
    Last Post: - 18th September 2014, 07:59
  2. amount of ram
    By vicce67 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 5th November 2012, 17:15
  3. how to store a very large amount of data
    By shaiqbashir in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 2nd April 2008, 06:05
  4. hserin
    By jcleaver in forum mel PIC BASIC Pro
    Replies: 28
    Last Post: - 21st February 2007, 18:15
  5. Hserin
    By Christopher4187 in forum General
    Replies: 3
    Last Post: - 20th March 2006, 23:09

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