On Wed, 05 Apr 2006 22:18:39 +0200, Barry wrote: >This one seems worth mentioning as I couldn't find it anywhere on the >web. I was porting the Weeder frequency counter code (from the Piclist >site) to the 16F6xx chips and I got really stuck. I'd disabled the >comparators and changed the variables addresses but it still wouldn't >work on the 628 - stranger still, it seemed to work OK in MPSIM but not >on the actual chip. Eventually I noticed that the F84 code uses the IRP >bit of the status register as a bit variable of its own, setting or >clearing it to indicate overflow in a calculation routine. This still >seems to work in MPSIM but not on the chip. Changing this bit variable >to use a normal file register got the code working OK. So, hopefully not >many people do this, but any F84 code which uses the IRP bit may work >differently on the 628. > The IRP and RP1 bits don't affect operation of the 16F84 since it only has two RAM banks. There's a note in the 16F84A datasheet: --quote-- Note 1: The IRP and RP1 bits (STATUS <7:6>) are not used by the PIC16F84A and should be programmed as cleared. Use of these bits as general purpose R/W bits is NOT recommended, since this may affect upward compatibility with future products. --end quote-- Regards, Bob -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist