I've done some testing with a 16F1938 which has the same module. The datasheet points out that the impedance of the DAC output pin is very high and suggests adding and opamp voltage follower buffer before using it. The ADC doesn't work well unless the impeadance is under 10k ohms IIRC. So let me throw out a couple of suggestions: 1. There is an internal routing of the DAC buffer to the ADC. I would suggest at least testing ADC channel 30, which connects to the DAC internally before moving further. 2. If you use an op-amp make sure that it's rail to rail for both the input and output. Since it's powered by Vdd and you're shooting for a voltage close to that, having rail to rail op amp is critical for proper operation. So no LM324, LM358, or LM741's for this. BAJ On Thu, Feb 05, 2015 at 11:45:06PM +0200, KPL wrote: > Hi, >=20 > I'm trying out an internal DAC of "enhanced core" 16f1824, but output > never gets close enough to VDD, which is configured as a reference. >=20 > in JAL my config looks this way: >=20 > DACCON0_DACEN=3D1 --enable DAC > DACCON0_DACLPS=3D1 -- positive ref > DACCON0_DACOE=3D1 --enable DAC output on RA0 > DACCON0_DACPSS=3D0b00 -- reference is VDD > DACCON0_DACNSS=3D0 -- negative source=3DVSS > DACCON1_DACR=3D0b11111 -- output level >=20 > Section about DAC is very small in the datasheet, probably something > important is missing. Any ideas? > I know, some of definitions are for "low power" mode, but I defined them = anyway. >=20 >=20 > Measurement is done using another pin and ADC; which works fine by > itself, shows 1023 when VDD is fed there. > When connected to DAC output, I get about 890 max. >=20 > --=20 > KPL > --=20 > http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist --=20 Byron A. Jeff Chair: Department of Computer Science and Information Technology College of Information and Mathematical Sciences Clayton State University http://faculty.clayton.edu/bjeff --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .