I made a circuit on a pic16f887 where I read an analog input and get a digital output in PORTD with leds. The problem is the circuit doesn't work at all, unless i am touching the top of the pic. can someone tell me what's going on and what can I do to fix this? Thanks in advance.
Concerning the circuit, I'm connecting a voltage divider with a pot to AN0 and connecting both Vdd and Vss in the pic and the PORTD output to leds and resistors.
this is my code:
Circuit only works when touching pic (ADC)
Concerning the circuit, I'm connecting a voltage divider with a pot to AN0 and connecting both Vdd and Vss in the pic and the PORTD output to leds and resistors.
this is my code:
Code (Text):
- LIST P=16F877A
- include...