On 1/23/08, Dumitru Stama wrote: > On Jan 24, 2008 3:49 AM, John Coppens wrote: > > On Thu, 24 Jan 2008 01:01:13 +0200 > > "Dumitru Stama" wrote: > > > > > I think i will try to test the ladder using some jumper switches > > > instead of PIC pins, this way at least i will know is not a "not enough > > > current" issue. > > > > But that is very easy to discard as a problem... Simply put out all ones, > > and measure the voltage in each output pin. It should be very near VCC. > > If that's ok, DO check the configuration. If you have the one intended > > for an Opamp amplifier (first link I sent), you cannot measure it without > > the opamp functioning (the opamp is needed to present a short to the R/2R > > network). > > The second configuration is slightly different, and should not be loaded > > at all (if you have an amplifier at the output, be sure it has its supply > > connected, and that the input can handle the 0-VCC swing of the R/2R > > (ie., don't supply it with VCC), else the inputs will load the network > > and produce things like you describe. > > John > > Do i really have to have an opamp functional to test the voltages ? > I only have about 5v as VCC and it is a bit hard to supply the amp > with enough juice. I have already sent 0xFF to PORTD and i have > voltages close to VCC on every pin. I will try to build it again with > 100k and 200k resistors and check the voltages step by step, after > each part : 1bit, 2bits, ..... 8 bits. Hand made R-2R ladder is the worst option ever for a DAC. I hope you have read first the theory of R-2R D2A and the non linearities you may get because of resistor unmatch. Also the inequal output impedance with bit variation... -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist