I’ve got an Imp3 running at 3.3 v and using pin C for analog out. It seems that I can go no lower than about 50mv even when I write the pin with a 0.0 value. Above that threshold, the output voltage is correct. I tried using a 4.7k pulldown, but that has no effect. How can I get voltages below 50mv out of this pin?
You should be getting lower than that; how is the VSSA pin connected? What load are you putting on the pin?
VSS is regulated 3.3v which I double checked. The analog pin feed the + input of an opamp (LMC7101) which has very high impedance. I noticed a problem when the output of the opamp was not going to zero or near zero when the input was supposed to be receiving a 0v signal. I checked the pin voltage with a VM, and sure enough, the lowest analog level is around 50mv. Doesn’t matter if it is connected to the opamp, or a pulldown, or both. Same value. I confirmed that I send a pin.write(0.0) when I need a 0v output. The pin level works properly for voltages above 50mv.
I suspect this could be that we always enable the DAC output buffer; the datasheet notes that 200mV is the minimum you can get in this scenario (vs 0.5mV typical with the output buffer disabled) - so you’re doing slightly better than expected; I’d not realized that the buffer had such a large effect on the output range.
Are you using the DAC or the ffdac? Seems like we could add another option pretty easily for the DAC that could disable the output buffer.
I’m using DAC. I thought it might be something like that. It would be nice if it could actually produce a 0v signal, especially since pin.write explicitly indicates that condition.