??? 02/28/08 01:12 Read: times |
#151578 - But the micro port shouldn't be driving anything Responding to: ???'s previous message |
I'm a bit confused with the discussion of the port driving currents. If the port is being used as an input it should have a '1' written to it and it isn't actively driving anything, right? You could even take the internal pull-up out (if you could) and the external Rpu will do the job just fine.
As I understand it, the only current flowing is the current necessary to charge and discharge the (very small) input capacitance so the port voltage changes. This current is caused by the sensor NPN pulling the node to ground, or the combined external and internal pull-ups sourcing current to pull the pin toward V+ when the NPN is off. When the NPN is ON, the node at the Sensor collector is near ground, and there is a voltage divider composed of Rpu(internal) and Rseries (external) that the port input "sees" and any changes due to the sensor NPN pulling the node to ground, or not, if off) have to charge/discharge the internal pin capacitance to alter its voltage. But the input capacitance is usually very small (some few pF) and at 4kHz should not be a problem if the Rseries is ~330ohms as people have suggested. Or have I (once again) missed the boat? |