Hello Jan-Erik, I didn't understand what you meant with the *single* bank stuff. Where in the datasheet did you find that all RAM locations are accessible from 2 or 4 Banks? Why do we need then STATUS,RP0 and STATUS,RP1? Just for the bulk of it? Since all RAM allocations are accessible from at least two banks, can you explain the following? How can you access the general purpose registers ( 0xA0 to 0xBF)on Bank1 on the PIC16F870 without switching banks? or perhaps, while in Bank0 how would you change the contents of any of the TRIS register without changing banks? This is breaking news for me, I'm very glad now we can get rid off the bank switching for the mid range pics, but OK if you can show me. There's nothing wrong with the template, at least because it does nothing except allocating a couple of registers. Jan-Erik Soderholm wrote Vincent Vega wrote > Hello everyone, > According to the linker script that comes with MPLAB > ver7.01(16f870.lkr or 16f870i.lkr) all the RAMs are unbanked. Well, no RAM location is only accessable from a *single* bank. > There's no DATABANK sections in the > script, only SHAREBANK. Maybe becuse all RAM are accessable from 2 or 4 banks. > According to the datasheet that's not the case, there are two > blocks of general purpose registers (0x20 to 0x7F and 0xA0 to 0xBF) > which are indeed banked. All RAM locations are accessable from (at least) two banks. > The included with MPLAB template f870tempo.asm won't even > compile properly with the supplied script. > Any ideas why is it so, any particular reason? An error inte the tamplate maybe ? :-) Regards, Jan-Erik. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist --------------------------------- Celebrate Yahoo!'s 10th Birthday! Yahoo! Netrospective: 100 Moments of the Web -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist