Funny you should ask. This one bit me this weekend... First, to define W_Temp in bank 1, just add 0x80 to the first location, so also define the same var (change the name slightly to something like W_TEMP1) in location 0xA0. That "mirrors" it in bank 1. Fig 2-4 on the 16F87x datasheer will help. Here's the part that bit me, so I'll save you some grief just in case... On other 16F PICs (such as the 16F874), there is a small data-RAM section that is shared/accessible in all the other banks, but that section on the 16F873/F874 is not completely shared in the other banks. Ex: locations 0x70-0x7F is not accessible in bank 1. Since I ported code over from a 16F872, I still had the original context-saving routine at the start of the ISR, but had to modify it to explicitly save W in bank 0. Example 12-1 on the 16F87x datasheet shows this as the 3rd instruction ("CLRF STATUS") to switch back to bank 0 before saving W. Cost me a few hours of very manual debugging before I realized this. :-( Cheers, -Neil. On Monday 13 June 2005 11:02 am, Francois Robbertze scribbled: > "For the PIC16F873/874 devices, the register W_TEMP must be defined in both > banks 0 and 1 and must be defined at the same offset from the bank base > address (i.e., If W_TEMP is defined at 0x20 in bank 0, it must also be > defined at 0xA0 in bank 1). The registers, PCLATH_TEMP and STATUS_TEMP, are > only defined in bank 0." > > To define W_TEMP in bank 0 is easy: > > W_TEMP equ 0x20 > STATUS_TEMP equ 0x21 > > How do one define W_TEMP in bank _1 again? > > regards > > Francois -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist