The code below was written deliberately without using include files, labels definitions etc, To absolutely ensure that no oddities were going on also it does not require anybody else who tries the code to have the same header files or include files. (In case they are not using MPLAB, And some do not!) The program is also small and simple. The problem is not a code/software problem. But appears to be a hardware problem with the PIC and RB3. I started with a working program that was using include files, macro etc. A program that has been in use in over 200 finished units that have been working happily for up to 3 years (so far). This same code in the same circuit using an A revision chip fails to function correctly. I ended up the simple code to prove it was not me but the PIC. (I was convinced it was me and did everything I could to prove it was not before settling for the PIC as the cause.) Regards Clive Frederickson R&D Technician (CECF Group) ---------- From: Olin Lathrop [SMTP:olin_piclist@EMBEDINC.COM] Sent: 01 May 2001 12:25 Subject: Re: [PIC]: P16F84 'A' Fun and Frolics > BCF 3,5 ; Bank 0 > > CLRF 05 ; Clear PORT A > CLRF 06 ; Clear PORT B > CLRF 0B ; Clear INTCON register 0000,0000 Use the include file and mnemonic register names! Looking for bugs in this code is a complete waste of time until you follow reasonable coding practices. Then you also don't have to waste the comments on explaining the instruction, but spend them instead on explaining the purpose of the instruction. ******************************************************************** Olin Lathrop, embedded systems consultant in Littleton Massachusetts (978) 742-9014, olin@embedinc.com, http://www.embedinc.com *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* The new Dyson Root8Cyclone(TM) vacuum cleaner is the most powerful upright available. See this new technology at http://www.rootcyclone.com Like all Dyson cleaners the Root8Cyclone(TM) maintains constant suction. Dyson scientists have developed the Root8Cyclone(TM) to give higher suction power and pick up more dust. It will be available from June 2001 in the UK. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads