PIC18F4515 Serin2 Maximum Array size


Closed Thread
Results 1 to 9 of 9
  1. #1

    Default PIC18F4515 Serin2 Maximum Array size

    Can anyone help, please. I'm using a PIC18F4515 and PBP. I'm trying to recieve serial data into a byte array of 805 bytes. Everything I can find states that this should be possible, but anytime I go over 256 bytes it does not work. In fact this is one of the reasons I switched up from a 16F877(a) part, due to it's 96 byte limitation. I no longer get the error on compile, but it still doesn't work.

    Am I missing a configuration bit, include, ???

    Thanks in advance for any input.

    Sam

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by millersamsr View Post
    Can anyone help, please. I'm using a PIC18F4515 and PBP. I'm trying to recieve serial data into a byte array of 805 bytes. Everything I can find states that this should be possible, but anytime I go over 256 bytes it does not work. In fact this is one of the reasons I switched up from a 16F877(a) part, due to it's 96 byte limitation. I no longer get the error on compile, but it still doesn't work.

    Am I missing a configuration bit, include, ???

    Thanks in advance for any input.

    Sam
    Are we supposed to guess at what your source code looks like?
    Even if we are, my guess is that your index variable for your array is a byte variable instead of a word variable.

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


    Did you find this post helpful? Yes | No

    Default

    While the 18F's can have very large arrays, the STR function of SERIN, HSERIN etc, can only receive 255 bytes.

    To get around this limitation you can just use multiple STR's in the xSERxxx command. For instance...
    Code:
    HSERIN [STR MyArray\255, STR MyArray(255)\255, STR MyArray(510)\295]
    HTH,
    DT

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    ..........Deleted.......

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Darrel Taylor View Post
    For instance...
    Code:
    HSERIN [STR MyArray\255, STR MyArray(255)\255, STR MyArray(510)\295]
    HTH,
    Somehow it looks like that last MyArray(510) won't work according to your explanation

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


    Did you find this post helpful? Yes | No

    Default

    Why not? Oops OK, but you get the idea.

    Fix it for me skimask
    <br>
    DT

  7. #7
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Darrel Taylor View Post
    Why not? Oops OK, but you get the idea.

    Fix it for me skimask
    <br>
    Hey...
    You're the asst_admin, not me.

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


    Did you find this post helpful? Yes | No

    Default

    I meant, fix the Statement, not the post.

    It's your quiz for the day.
    DT

  9. #9


    Did you find this post helpful? Yes | No

    Default Thank you!!!

    Skimask and Darrel,

    Thanks. I'm sorry about not posting the code. I didn't have it with me when I posted the question. Thankfully, you've answered it before I had a chance to. I'll check it out in the morning.

    I appreciate the rapid response. Have a great night.

    Sam

Similar Threads

  1. Bits, Bytes Words and Arrays
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 24
    Last Post: - 14th June 2016, 08:55
  2. Simple Array Demo
    By Archangel in forum Code Examples
    Replies: 5
    Last Post: - 15th February 2010, 05:46
  3. RS232 receive an array (packet)
    By ELCouz in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 12th February 2008, 06:02
  4. Trouble with Serin2 and variable size
    By Ryan7777 in forum Serial
    Replies: 6
    Last Post: - 5th October 2006, 17:40
  5. Maximum variable array ?
    By Keith55555 in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 7th May 2004, 15:29

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