Announcement

Collapse
No announcement yet.

array size limit value

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • array size limit value

    "sDataArray var BYTE[5000]" gets a compiler error. The manual says the size value is limited to the available memory. I am using PIC 18F97J60 which has 128K of memory.
    Am I doing something wrong or is there some way to alter the compiler's action.
    I am using the bpb Pro compiler 3.0.5.4

  • #2
    The 18F97J60 has 128K of Flash memory (Program space).
    But it only has 3808 bytes of RAM (variable space).

    PBP uses some of that, 24+ bytes.
    So you'll only be able to have an array of somewhere around 3780 or so.
    Any other variables in your program will use RAM too, reducing the array size further.
    PBP3 Manual : Microchip Datasheets - 10F, 12F, 16F, 18F
    Never download a PIC datasheet from anywhere but microchip.com

    Comment


    • #3
      Additional data memory on the PC board

      Thanks for the quick response to my array size problem.
      My engineer says there is also a 256k memory chip on the board.
      Two part question. How to enable/access this memory and how to get PBP to see it?
      If there is any documentation for this we would greatly appreciate a link.
      Thanks again,
      Henry

      Comment


      • #4
        That depends on what kind of memory it is.
        It could be RAM or EEPROM, with SPI, I2C, Parallel or something different.

        But if you're thinking it will just add more memory avialable for variables in PBP ... that's not the way it works.
        PBP3 Manual : Microchip Datasheets - 10F, 12F, 16F, 18F
        Never download a PIC datasheet from anywhere but microchip.com

        Comment

        Working...
        X