No announcement yet.

Compiled Program memory usage

  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    I think, because you only use indirect accessing to write to RX_BUFFER, it won't matter if that particular array is in BANK0 or BANK1 as long as the IRP bit in the STATUS SFR is clear. Try declaring all the other asm-relevant variables to BANK0 and RX_BUFFER to BANK1 and test it.

    You're having to deal with this because of all the asm code in your program. If you wrote the program in PBP with just an asm interrupt routine, you wouldn't have to worry about it. When writing asm code that accesses variables, you can't avoid banking concerns. This is common with all PICs, You can avoid code-page concerns if you go to a PIC18.

    There are certainly more powerful PICs to consider, but with the 16F886 you're already on the top of the line in the mid-range architecture. The only place to go is a PIC18 or an enhanced mid-range 16F, and both of those will require changes to the inline asm code. It won't be a complete rewrite, but some tweaks will probably be necessary. I use the PIC18F26K22 for a 28-pin option.
    Charles Leo
    ME Labs, Inc.


    • #17
      Understood - I'll take a look at that and endeavour to get RX_Buffer in to BANK 1- Thank you.