Digital Inputs, Pull Ups, Signal Width

Thread Starter

ERobishaw

Joined Jul 21, 2008
3
Trying to create a product using various digital I/o boards and am having trouble understanding various issues.

What does a pull up resistor do -- generally speaking when do I need one?


The typical I/O device will have so many "general purpose I/O lines". If I want to read a signal from a device creating pulses, w/o using an interrupt driven I/o line, do I have to continually poll the I/o line for state? Meaning I can only determine if a pulse occurs if I'm polling during the pulse? And therefore, if a pulse has 5ms, I have to poll at-least that frequently?

If a pulse device lists the output as having a "maximum sinking current of 100mA@36VDC" does that mean it's actually putting out 36VDC? And my digital input which operates 0-5V will not work?

Thanks
 

SgtWookie

Joined Jul 17, 2007
22,230
Trying to create a product using various digital I/o boards and am having trouble understanding various issues.

What does a pull up resistor do -- generally speaking when do I need one?
If a device has "totem pole" outputs, you generally do not need one.
If a device has "open collector" outputs, it has no source of current; therefore it needs one. A suitably sized resistor connected to Vcc can supply that current.

The typical I/O device will have so many "general purpose I/O lines". If I want to read a signal from a device creating pulses, w/o using an interrupt driven I/O line, do I have to continually poll the I/o line for state?
Yes.
Meaning I can only determine if a pulse occurs if I'm polling during the pulse?
Correct.
And therefore, if a pulse has 5ms, I have to poll at-least that frequently?
Actually, better poll it a bit more frequently than that, otherwise you could miss it due to propagation delays. 4mS would be much better.
If a pulse device lists the output as having a "maximum sinking current of 100mA@36VDC" does that mean it's actually putting out 36VDC?
No, it means that it can sink the current; ie: shunt it to ground.
And my digital input which operates 0-5V will not work?
If you subject a 0-5v digital input to 36vdc @100mA, you will very likely blow the lid right off of the IC. You need some kind of logic-level controlled Darlington transistor or MOSFET device to sink that much current.
A ULN2803A is an IC which contains eight Darlington pair channels, complete with current limiting resistors on the inputs. It can sink up to 500mA/channel, and is good for around 50v.
 

Thread Starter

ERobishaw

Joined Jul 21, 2008
3
Thanks.

If I had an ouput device that produced a pulse width of 135ms but the input device was filtered to only read max 200ms... would it be possible to put capacitor inline to essentially widen the pulse width (maybe along with a resistor to bring the current back down)?
 

SgtWookie

Joined Jul 17, 2007
22,230
Thanks.

If I had an ouput device that produced a pulse width of 135ms but the input device was filtered to only read max 200ms... would it be possible to put capacitor inline to essentially widen the pulse width (maybe along with a resistor to bring the current back down)?
Well, you might do something like use a Schottky or switching diode and a small cap. If you poll the input and it's low, do nothing. If it's high, note that, then set the pin to output a zero to drain the charge from the cap, and then change it back to input.
 
Top