EEVblog Electronics Community Forum
Electronics => Microcontrollers => Topic started by: Ammar on May 24, 2017, 11:57:49 pm
-
Has anyone used the PIC16LF1704 before? It has an 8 bit DAC, which I would like to use to drive a load of around 1mA at 2V (Vdd=2V).
The data sheet refers to the need for an external op amp to buffer the DAC output:
http://ww1.microchip.com/downloads/en/DeviceDoc/40001715B.pdf#G23.1225705 (http://ww1.microchip.com/downloads/en/DeviceDoc/40001715B.pdf#G23.1225705)
And makes no reference to the fact that the device has an internal configurable op amp in the DAC section. Then the op amp section shows that the DAC output can be connected internally to the internal op amp:
http://ww1.microchip.com/downloads/en/DeviceDoc/40001715B.pdf#G22.1225738 (http://ww1.microchip.com/downloads/en/DeviceDoc/40001715B.pdf#G22.1225738)
It also offers no specs on the op amp and just describes the properties of a good op amp without giving data. Example:
http://ww1.microchip.com/downloads/en/DeviceDoc/40001715B.pdf#G22.1225738 (http://ww1.microchip.com/downloads/en/DeviceDoc/40001715B.pdf#G22.1225738)
"Input offset voltage is a measure of the voltage difference between the OPA+ and OPA- inputs in a closed loop circuit with the OPA in its linear region. The offset voltage will appear as a DC offset in the output equal to the input offset voltage, multiplied by the gain of the circuit. The input offset voltage is also affected by the Common mode voltage. The OPA is factory calibrated to minimize the input offset voltage of the module."
Yes, we all know that a small input offset is good, the spec would be better. Has anyone had any experience using internal analog peripherals with PICs? Finding it hard to have confidence with a lack of specs and slightly contradicting info in the datasheet, despite a relatively small load that needs to be driven.
-
DAC is 600 Ohm per step, so it cannot drive 1mA directly.
There are some op amp characteristics in table 32-17 of the datasheet (e.g. input offset voltage is 3mV), also a number of graphs further down. But this is certainly much less than you would normally find in datasheets for standalone op amps.
-
Thanks for that North Guy. I will assume the op amp can provide 1mA and just give it a go. It will be very surprising if it can't.
-
I've used the opamps and DAC in that device. I don't have the equipment to accurately measure specs such as input offset but they didn't seem that bad. Certainly accurate enough for 8-bit resolution. They are kind of odd in that you can't connect much to them internally - although as you pointed out they did include the DAC output in that - so I mostly just used them to replace an LM358 in some applications (low side current sensing, voltage follower, 2nd order filter for PWM etc..).
I'll admit I too don't really trust the internal opamps as they tend to be characterized rather than tested, but can come in handy. Wouldn't use for anything that requires accuracy.
-
Thanks Buriedcode. Well, I would like precision. I think I will go with an external op amp just to be safe. It would be good if microchip went to a little more effort to characterise these things.
-
As a general rule you should read the most current datasheet
http://ww1.microchip.com/downloads/en/DeviceDoc/40001715D.pdf (http://ww1.microchip.com/downloads/en/DeviceDoc/40001715D.pdf)
unfortunately no mention of output current in this one either, but keep in mind this is intended for buffering / general filtering / amplifying small signals.. exactly what buriedcode used it for.
I built an audio VCA out of a matched pair in a tin can, an opamp and the 1708. the internal opamp of the 1708 was used to buffer the DAC output that then went to the control the diff pair current sink. good enough for that
bottom line, i am sure it can stand 1mA, it's 5mW at 5 volts. Otherwise I'm sure they would have mentioned it