Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

16F Bankselect

Status
Not open for further replies.

Mosaic

Well-Known Member
Hi guys,
Is there an easy way to keep track of page boundaries when handling Call or Goto statements which cross the bank/page boundaries?
 
Yes, use C. On a more serious note, not really. I tend to group routines and place them in an upper bank and add the bank number to the end of the name. If MPASM was a little better, like being 3 pass rather than two, you could write a macro to take care of it. Unfortunately, it's a very basic assembler and the macro language leaves much to be desired. One way to automate it would be to always insert the bank switch instructions but that makes each call 2 or 3 instructions.

Mike.
 
A little digging has revealed to me that the midrange 16F,12F series chips have a full 11 bit addressing for Call/Goto statements.
Doesn't this mean that the 2k code Address space does not require bankswitching?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top