Hello to the list. =20 I am reasonably new to PIC assembler and PICs in general and I have a question, hoping to get some ideas from the vast experience here on the list. =20 Pic 16f84a, 4mhz, 3 7 seg leds driven by PortB,6:0 and triggered by PortA,2:0. PortA,3 is count input, High to trigger, and PortA,4 is Direction indication. =20 I have written a 16 bit counting program that will perform the = following functions: =20 Check EEprom and set FF to 00 initially. This is a one = time only process. After this is done, EEprom is read at powerup and reset = time to display saved values. =20 Second, it will loop, checking and waiting for a pulse = input on RA3 to indicate a count of one =20 It will then check for logic level on RA4 to indicate = direction =20 Finally, during the pulse counting, it will convert for = display on 7 seg leds, also updating EEprom . =20 Now, the =93problem=94. When I bring MCLR low to reset the chip, the = display will usually show erratic values. If I power down the test board, it = will power up with the usual erratic values, although EEprom holds the = correct values. =20 I have been checking, but haven=92t found what I might do to ensure = that PORTB is =93clean=94 to accept the EEprom values at restart time. =20 =20 Thank you all for your attention and thanks also for the great info = from all the contributors on the list. =20 Mark Cherry Sacramento, CA --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.545 / Virus Database: 339 - Release Date: 11/27/2003 =20 -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.