2
\$\begingroup\$

Using a PIC16F1825 microcontroller I was seeing incorrect values being output on the DACOUT pin. The setup stipulated using the fraction 8/32 * VREF+ where VREF+ was an external 2.5V reference. The output should have been 0.625 but was twice that value.

(have answer myself)

asked May 19, 2015 at 11:02
\$\endgroup\$

1 Answer 1

3
\$\begingroup\$

The answer is two fold:

Firstly - pull up resistors are enabled by default on all input ports when WPUEN# in OPTION_REG is cleared. This will affect analog inputs like VREF+ and may affect analog outputs like DACOUT. I'm not certain on the last point as I have not tested that assertion - it seems wrong on the face of it though. This is true for the PIC16F1825 but may not be true for other PIC micros in other ranges.

Secondly - the DACOUT and VREF+ pins are, on this micro, shared with the PGD and PGC pins. If a PICKIT3 is connected, that device has 4k7 pull down resistors on both these pins.

If using VREF+ or DACOUT, make sure pullups are disabled and the PICKIT3 is disconnected.

answered May 19, 2015 at 11:03
\$\endgroup\$

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.