Connecting 5V logic output to P2 - is a resistor sufficient...
![pik33](https://forums.parallax.com/uploads/userpics/026/nFBJPVUJK5HCS.jpg)
in Propeller 2
... or more complex solutions have to be used?
TTL level signals have to be connected with several microseconds timings (TTL serial port, TTL proximity sensor)
If the resistor is sufficient, what should be its resistance to be safe?
Comments
we've followed the P1's ~500uA suggestion and been ok thus far. (5v-3v3)/500uA ~ 3k4.
But, much healthier if you can use two resistors to form a divider
Think I’d try a 10k resistor first
I will try 10k/20k divider and check if it works.
You can also use a 1k series resistor and activate the internal 1.5k pulldown resistor. So the protection diodes are not stressed and the input is still very fast.
For slower signals, you can use 10k series and a 15k internal pulldown.
Andy
Consider that the internal pulldown is active not before the propeller has booted. A single 1k resistor won't hurt as injecting 1.5mA won't cause any damage. But I've seen some strange effects of neighbouring pins reading false inputs on the P1 if multiple pins are driven with 5V through series resistors. Now, I always try to use dividers. 1k8 / 3k3 works well.
Yes, that is a lateral current effect, caused because the clamp diode is not actually a simple diode, but is a sideways PNP transistor.
It is common across all CMOS parts. Current injected into the emitter, can travel laterally and appear on other collectors (nearby pins).
The 'gain' is quite low, but it can be enough to disturb higher impedance or analog-use pins.
Hmm you raise interesting points jmg, we could put the neighbouring pins into ADC mode and see what they see above the rail, and how many pins away they can see it.
Another interesting P2 feature...