I have a set of macros I use for bank selects on 16F chips. When I moved some of the code over to 18F, I just made the macros empty. Harold > My EE read problem was due to the address for the defaults. Now solved. > > Porting wasn't really a battle on my end, but this code (from memory) > stopped > me for a couple minutes... > OW_PORT EQU PORTB ; One-wire I/O port > OW_PIN EQU D'7' ; One-wire I/O pin # > ... > OW_SetLo: > bcf STATUS,RP0 ; Bank 0 > bcf OW_PORT,OW_PIN ; Set low first > bsf STATUS,RP0 ; Bank 1 > bcf OW_PORT,OW_PIN ; Will actually tris the pin as o/p since in bank 1 > OW_SetLoDone: > return > > The idea was that if I changed port/pin later, I would not have to change > multiple definitions. But with the 18F, the PORT and TRIS values were not > in > the same offset in different banks (as with the 16F), so simply removing > the > bank-selection statements changed the meaning of everything. > > Cheers, > -Neil. -- FCC Rules Updated Daily at http://www.hallikainen.com -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist