Any problem in declaring and using VARs longer than 512 bytes?


Closed Thread
Results 1 to 5 of 5

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default Variables

    I built an MP3 player, used a PIC18F4620, and if I remember right I used up practically all of the onchip ram in one word variable:
    sectorbuffer var word[1536], or maybe it was more than one. I'll check when I get home tonight.

    Easiest way is to just write the program and compile it. If you get an error, you can't.
    Wish I had more instant info for ya....
    JDG

  2. #2
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Default Sorry I missed the 18Fxxx issue

    Hi All,

    Sorry I missed that the used chip is a PIC18. It does have a linear addressing for the RAM location.
    Arrays must fit entirely within one RAM bank on most PICmicro MCUs.
    They may not span RAM banks on 12-bit, 14-bit or 17Cxxx devices.
    (Arrays may span banks on 18Xxxx 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.
    Define your array to a specific bank such that it spills over to the next bank.
    Regards

    Sougata

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