Hi. I'd also like to add that it was not clear from the original post which PIC this is about. Note that the newer PIC16F1xxx ("Enhanced Midrange") series has a faster bank switching then the older PIC16. One single instruktion instead of 2 (on the old 4 bank models). And besides of that, more file registers are common over all banks and doesn't need any bankswitch commands at all. If you are right at the memory limit, this might make a difference. Jan-Erik. RussellMc wrote 2013-09-30 10:41: > Svetlin - welcome to the list. Good to see that you managed to > overcome whatever it was that was blocking access. > >> everywhere and vegetables on top). What I am trying to achieve now is to >> shave some bytes, so the code can fit in the flash memory of the PIC, by >> reducing some banksel lines. > > While the following is not precisely what you asked for, it may be of > assistance and could be of great future use to you. > > (The great) Olin Lathrop has evolved a PIC development environment > which includes a group of macros which simplify bank handling and help > you to avoid the typical problems and errors encountered in this area. > I have never used this environment myself BUT it is extremely well > spoken of and recommended by the many who have. Fully free for any > use - but do read his (exceptionally reasonable) legal stuff. > > Olin's environment can be found here > > http://www.embedinc.com/pic/ > > General downloads here > > http://www.embedinc.com/pic/dload.htm > > If you search the list archives you will find much discussion on the > use of this environment. > > > > Russell > --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .