Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Couple of pull-up resistor questions/verifications

Status
Not open for further replies.

MacGyverS2000

Electrical
Dec 22, 2003
8,504
1) A current PIC design uses 10k pull-up resistors and 10nF caps for bounce smoothing on a keypad. Current is obviously 500uA with the resistors, but I would like everyone's opinion on using the internal pull-ups on the PIC. Min/typical/max ratings are 50/250/400uA for each pin. Does everyone think I'm safe removing the external resistors and enabling the internal pull-ups?

2) To verify...TTL inputs tend to float high, but is there any overwhelming reason to tie them either way, and what is it? If so, is a resistor required in either case, or is a direct connection to Vcc/Gnd OK?

3) To verify...CMOS input float in no particular direction, which is bad. Again, I assume there's no difference between tieing high or low, and no resistor is required for either. Ground usually seems the logical choice since it's usually found everywhere on a typical board.

Sound about right to everyone?
 
Replies continue below

Recommended for you

Hi, 10k/10nf doesn't give you much debounce, not enough to make any difference to a keypad anyway. I've never trusted internal pullups, I have been let down in the past. TTL are pulled high because they use less current that way, traditionally via a resistor but not needed for most families (only the original TTL). CMOS inputs can go either way, whichever is easiest for your board layout, often they are tied to another driven input.
 
Analog de-bounce is not required on micro-controller applications. The micro-controller can just read the port again effectively doing the de-bounce in software.

Does anybody still use TTL? There are inputs which are TTL compatible CMOS, but these still need to be tied one way or the other.

Unused CMOS inputs can be tied without using resistors. One reason to use resistors is for ATE testing, so standard macros can be used to test each input.
 
Several of the PICs I've worked with over the years have been mixed process. For example, the 16F870 uses CMOS I/O on some pins, but combined CMOS outputs and TTL inputs on others.

Analog debounce is the way to go if you cannot spare many cycles for software debouncing. I've used both methods with great success, but sometimes you just have to work with what you are given.
 
There's a great article in this month's issue of Embedded Systems discussing debouncing and how varied switch bounce is for different switches. Glitching as short as 1 microsecond to milliseconds.

TTFN
 
The "TTL" inputs on your PIC are not of TTL technology. It means that the threshold for 1 or 0 is compatible to TTL levels, thus a logic 1 is at 2.0 volts. But they're still CMOS technology so you better not let them float.
TTLs were bipolar and had internal pullups by design, to get them working. There were variants between families but I've never seen a TTL going nuts because of a floating input.
I suggest that you keep you pullups and caps, and even add series resistors, not for debouncing, but to reduce EMI and ESD unless your keypad is metallized or well insulated.
 
Would declaring all of the unused pins outputs be the easiest solution? The internals will try to drive the pin to the reset state (most likely 0 on most of the pins), with no real current drw once it has settled into a specific state.

As a side question, is there any way to determine if a chip is using true TTL technology, short of seeing the detailed schematic, or should I just assume most major processors/chips made in the past 5 or so years uses strictly CMOS? Microchip leads you to believe both processes exist on their chips, but there's no way I've been able to find to confirm/deny that, other than to realize CMOS is used where power is a concern and low switching speeds are in use.
 
TTL devices have an active transistor on the input pin with it's emitter connected to the input. When the input goes low, the transistor actively turns off the next stage. When there is no path to ground, the base bias resistor pulls up the next node through the BC junction.

While you can get away with floating TTL inputs, it has never been recommended practice, since enough charge on the input pin can cause a momentary noise glitch to occur.

TTFN
 
As a general rule, you should either tie unused inputs either high or low, or configure the pins as outputs....
 
Microchip very explicitly presents their PICs as CMOS microcontrollers. I don't think any manufacturer of microcontroller makes other than CMOS. As Melone states, if you can configure the unused pins as outputs, this is perfect.
IRstuff, please correct me if I'm wrong. The transistor at a TTL input is used as two back-to-back diodes, with no amplification function of any sort, thus the internal pullup resistor can be considered the same type of load as if it was an external pullup. More, if you look at an LSTTL internal schematic, there is no more transistor, only a diode.
The susceptibility to a glitch won't be different from one of a CMOS input with the equivalent external pullup. (if the transfer function is equivalent)
 
The TTL input transistor is used as an active transistor when the input is low. The gain allows the next stage to be turned off quicker, otherwise, you rely only on the emitter-base junction discharge of the second stage, which could be quite slow.

TTFN
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor