> I have the OSC set as HS and it runs at 4 mhz That should be no problem. There have been some recent issues with the PLL enabled. > The basic code in the sim looks like this:- > > Movlw 127 > Movwf ADCON1 > > btfsc PORTA,5 > goto handle_high > goto handle_low > > > handle_high > goto $ > > handle_low > goto $ > END This looks fine. What is the symptom? It would be useful to set another port pin high or low before the infinite loops so that you can see which path it took when running on a real chip. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu