> Is there any way to detect this block is not working properly > before start working with it?? If you don't have access to an oscilloscope or analyser the easiest way might be with LEDs. Put a pot on the analogue input, divide the result by 4 (right-shift twice) and send that to PortB, which has an LED on each pin (use resistors with a high enough value to stay safe wrt the port current). When Vin = Vref- all the LEDs should be off, displaying in binary up to all on as you increase Vin Just follow the set-up (ADCON0, ADCON1, TRISA, TRISE etc) and sampling steps in the manual. Usually not too much trouble to get the ADC going Don't forget that the result registers are in different banks, ADRESL is in Bank1, ADRESH in Bank0 Voltage into a pin should not be lower than 0.6V or it'll pop, possibly also destroying other parts of the PIC. Protect it with a Schottky diode (anode to 0V, cathode to pin), which limits the voltage below 0V to about -0.3V. Perhaps even a litle series resistance (470R ?) from the source to the pin, or buffer the input with an op-amp. Or even all three if the PIC is in a noisy environment (relays/solenoids going off, RF, EMF etc) -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist