Is there a trick to make the RA4 pin on a 16C84 an output. I have the PIC connected to an 8 BIT ADC, if I read the ADC and then send a HI to either RA0 throught to RA3, depending on the value recieved from the ADC, 0 to 63 = HI on pin RA0 only. 64 to 128 = HI on pin RA1 only. 129 to 191 = HI on pin RA2 only. 192 to 255 = HI on pin RA3 only. everything works fine, BUT when I try and use RA4 as well, 0 to 50 = HI on pin RA0 only. 51 to 100 = HI on pin RA1 only. 101 to 150 = HI on pin RA2 only. 151 to 200 = HI on pin RA3 only. 201 to 255 = HI on pin RA4 only. everything works fine UNTIL the value from the ADC is in the 201 to 255 range and the RA4 pin changes from the LOW to an open state, neither HI or LOW, but it seems to work right in MPLAB simulator. If it matters I am using a 4Mh crystal and only set the Power Up Timer fuse. I am sure the port is initialised for output and MPLAB simulator also shows this. Thanks Dean. (-; Why are there flotation devices under plane seats instead of parachutes? ;-) PS. I am fairly new to programming and this is only my second PIC program.I actually wrote it in a language called SIL, similar to Pascal/Basic. Thanks Lars Silen for this Free Software. http://koti.kolumbus.fi/~larsil/pcomp.htm. I also used a love my Logic probe from Peter Anderson: http://www.access.digex.net/~pha/index.html you get a PIC 12C508 or 509 that is hooked to an LED that is lit brighty when probe is connected to HI, off when connected to LOW, and dimly when not connected to either, and pulses when on a pulsing line. It also has two clock output pins, a once a second and a 10 a second clock output. I ran my 16C84 off of these and could count the pulses being sent to my ADC.(could count 7 IO/CLK pulses to ADC when I should have been sending 8, Doh!).