Menu

How to use all the memory in a PIC?

Help
2011-01-19
2013-05-30
  • Nobody/Anonymous

    I believe this is used with the banksel or similar command…

    PICs have their memory in 2 separate banks, and can't be accessed unless a bit is changed, if I understand it correctly (probably not).

    Has GCBASIC solved this issue? I remember running into a problem years ago in GCBASIC, where my program went over the 4KB memory bank (even thought the chip had 8 KB total, but over 2 banks). Back then, I was given the solution "use an 18F chip which has a larger amount of memory per bank."

    It would be nice to use all the memory in a PIC…

     
  • Nobody/Anonymous

    Bank switched PICS all have a problem where the page boundary exists, regardless of what program is being coded for them.
    Programs cant cross a page boundary, but that doesnt mean you cant use all the memory.
    You can for example, store data in the upper page or locate subroutines in the higher page.
    Gcbasic will use all available memory, but it wont allow a program to cross the page boundary.
    So if your program can be designed so that it comprises a small main part, with sub routines making up the rest
    then you can use all the memory.
    It is better though, to use linearly mapped memory if you have big programs.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.