bytes reservation (numbers of elements)


Closed Thread
Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    The book also says

    "Arrays must fit entirely within one RAM bank on most PICmicros. They may not span RAM banks on 14-bit or 17Cxxx devices. (Arrays may span banks on 18Cxxx devices. Byte- and word-sized arrays are only limited in length by the amount of memory.) The compiler will assure that arrays will fit in memory before successfully compiling."

    I am not familiar with the PIC 16F676 so decided to look up the datasheet
    http://ww1.microchip.com/downloads/e...Doc/40039c.pdf

    At the bottom of page three it says "SRAM 64 bytes EEPROM 128 bytes"

    Have you quoted the correct processor number ?

    I was unable to create a large array on a 16F processor despite having enough memory but on an 18F it worked just fine
    Keith

    www.diyha.co.uk
    www.kat5.tv

  2. #2
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by keithdoxey
    Have you quoted the correct processor number ?
    Hmmm, on a hunch I looked at the 16F767 which does have 368 bytes of RAM
    http://ww1.microchip.com/downloads/e...Doc/30498c.pdf

    Page 18 however reveals this is 96 bytes in each of Banks 0,2,3 and 80 bytes in Bank 1 so 96 bytes would be the maximum and you would probably have to specify a bank to ensure it fitted.
    Keith

    www.diyha.co.uk
    www.kat5.tv

  3. #3
    Join Date
    Oct 2003
    Location
    holland
    Posts
    251


    Did you find this post helpful? Yes | No

    Default

    It was an typing error I use the 16F876 and it has also 368 bytes of ram.
    But I understand that I cross the bank.
    Thanks, I know now what I must to do.

Similar Threads

  1. Bits, Bytes Words and Arrays
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 24
    Last Post: - 14th June 2016, 07:55
  2. LP Instant Interrupts Error
    By Kamikaze47 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 7th December 2009, 09:13
  3. Replies: 4
    Last Post: - 15th April 2009, 01:54
  4. bytes compressed and encrypted
    By RAYMON in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 3rd March 2009, 11:24
  5. Splitting numbers and recombining them(EEPROM Error)
    By selbstdual in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 3rd June 2007, 06:40

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