Need Help w/ Leaking Chips
Sunflower
Posts: 48
Need Help w/ Leaking Chips
I am having trouble with leakage or something in the ADC PCF8591 using I2C from the BS2p.
It seems I must read each channel twice because reading an adjacent prior channel drops the current channel by as much as 20%, especially noticeable when the prior channel is pulled to Vss. The reflection disappears when the prior channel is pulled to Vdd. Software and hardware are all ok. I have clean power and bypass caps. I have also replaced the PCF8591 twice from the same package. Should I be paranoid of a bad batch of chips? I have no prior experience with ADC. The mid point value of 128 drifts +/- 4 in isolation, but drops to 105 when the prior channel (tied to Vss) receives an I2COUT command.
I2COUT cport,$90,[noparse][[/noparse]%00000010] 'Channel 3
I2CIN cport,$91,[noparse][[/noparse]dummy,chan3]
I2COUT cport,$90,[noparse][[/noparse]%00000011] 'Channel 4
I2CIN cport,$91,[noparse][[/noparse]dummy,chan4]
DEBUG CRSRXY,15,0,DEC chan4," "
I2COUT cport,$90,[noparse][[/noparse]%00000011] 'Channel 4 again
I2CIN cport,$91,[noparse][[/noparse]dummy,chan4]
DEBUG CRSRXY,15,1,DEC chan4," "
I've tried leaving the oscillator on (which pulled values down a little), and used PAUSE between commands, but the problem persists. Anybody out there with experience on such anomalies?
I am having trouble with leakage or something in the ADC PCF8591 using I2C from the BS2p.
It seems I must read each channel twice because reading an adjacent prior channel drops the current channel by as much as 20%, especially noticeable when the prior channel is pulled to Vss. The reflection disappears when the prior channel is pulled to Vdd. Software and hardware are all ok. I have clean power and bypass caps. I have also replaced the PCF8591 twice from the same package. Should I be paranoid of a bad batch of chips? I have no prior experience with ADC. The mid point value of 128 drifts +/- 4 in isolation, but drops to 105 when the prior channel (tied to Vss) receives an I2COUT command.
I2COUT cport,$90,[noparse][[/noparse]%00000010] 'Channel 3
I2CIN cport,$91,[noparse][[/noparse]dummy,chan3]
I2COUT cport,$90,[noparse][[/noparse]%00000011] 'Channel 4
I2CIN cport,$91,[noparse][[/noparse]dummy,chan4]
DEBUG CRSRXY,15,0,DEC chan4," "
I2COUT cport,$90,[noparse][[/noparse]%00000011] 'Channel 4 again
I2CIN cport,$91,[noparse][[/noparse]dummy,chan4]
DEBUG CRSRXY,15,1,DEC chan4," "
I've tried leaving the oscillator on (which pulled values down a little), and used PAUSE between commands, but the problem persists. Anybody out there with experience on such anomalies?
Comments
Do you have 4.7K pull-up resistors on BOTH I2C lines as is required? If not, add them and the problem will probably disappear.
Regards,
Bruce Bates
Jonathan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
The ADC is on one of those white experimenters boards. Would that cause problems?
100 K pots would be much more likely to minimize the affect of any leakage currents.
The chip itself has a small capacitive coupling from one channel to the next, but those white breadboards add a large capacitance from pin to pin, on the order of 100pf. Adding a capacitor from the input to ground can absorb some of the energy. Also use the 100k pot.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com