??? 11/24/08 18:06 Read: times |
#160271 - you need a pullup for this Responding to: ???'s previous message |
The PIC Pins are Input or Output. The 8052 is pseudo bi-directional.
For the 8052 simply write a "0" to the pin, wait the amount of time the cap needs to discharge. then write a "1" to the pin and start timing. you need a pullup for this, the internal pullup (both short strong and 'resistive') are miserably variable (chip to chip, temp, ....) I'd use a P0 pin for this to avoid the mess. anyhow, of youn were to use an op-amp or comparator, why not use a A/D converter instead. Erik |