| ??? 01/21/05 15:45 Read: times |
#85514 - Not quite so. Responding to: ???'s previous message |
While the worry of a conflict when such pin turns to output (and to zero) is slightly adequate, you still should have full control on your inputs and outputs. But the following is a bit of exagerration.
Michael Karas said:
A pull down resistor that can overcome the onboard weak pullups of a typical 8051 style I/O pin needs to be a quite low valued resistor in comparison to the size of resistor to do an adequate job of pulling up an idle input. 1. No internal pullups on port 0. No such worry there. 2. A quick glance into a typical '51 datasheet (AT89S5x this time): IIL Logical 0 Input Current (Ports 1,2,3) VIN = 0.45V max. -50 µA OK so this means that the internal pullup is equivalent to 100kOhm or so. To overcome this, let's assume 0.45V is a pretty good zero, hence 9kOhm pulldown is enough. OK, let's make it 4k7, it is my favourite off-the-drawer resistor. It means, you need to "source" roughly 1mA with the optocoupler's transistor (and it does not matter at all if it is NPN or PNP, it has a floating base and it has no way to find out, how it is connected!!!). With a standard PC816 with CTRmin=50% this means 2mA at the LED, no extremity I think. While there is probably no justification to use such circuit with a '51s input (and there is the risk of turning it to output and to zero at a wrong time), there are situations where such circuits can, and should be used. One typical is an optically decoupled RS485, where the RS485 side has an independent power source; with a standard 75176-and-alike you need to keep your DE at zero even if the '51 has no power. I found that it is a quite common practice here to say "this is bad", rather than "this is uncommon and use it with care only if really needed, because of this and this". Jan Waclawek |
| Topic | Author | Date |
| Inputs | 01/01/70 00:00 | |
| Opto | 01/01/70 00:00 | |
| Opto input | 01/01/70 00:00 | |
| Optocoupler Designer’s Guide | 01/01/70 00:00 | |
| What type of opto? | 01/01/70 00:00 | |
| pulling high | 01/01/70 00:00 | |
| Why??? | 01/01/70 00:00 | |
| Misleading.... | 01/01/70 00:00 | |
| OK, clearer | 01/01/70 00:00 | |
| I must be stupid... | 01/01/70 00:00 | |
| you are not | 01/01/70 00:00 | |
| Heres Why | 01/01/70 00:00 | |
| Not quite so. | 01/01/70 00:00 | |
| Pull-downs must be much smaller! | 01/01/70 00:00 | |
| OK you are right. | 01/01/70 00:00 | |
A little history | 01/01/70 00:00 | |
| Link... | 01/01/70 00:00 | |
| use opto-coupler as NPN | 01/01/70 00:00 | |
| Thank you All, & a question for Kai | 01/01/70 00:00 | |
| Opto to pull-down signal | 01/01/70 00:00 |



