Файл: Embedded Controller Hardware Design (Ken Arnold, 2001).pdf

ВУЗ: Не указан

Категория: Не указан

Дисциплина: Не указана

Добавлен: 13.06.2025

Просмотров: 2697

Скачиваний: 0

ВНИМАНИЕ! Если данный файл нарушает Ваши авторские права, то обязательно сообщите нам.

72EMBEDDED CONTROLLER

Hardware Design

For traces on a standard printed circuit board, the value for D will be in the range of 100 to 200 pS/in. Depending upon how much distortion you’re willing to live with, the critical trace length will be between one-sixth and one-quarter of the length of a trace corresponding to the signal’s transition. For a trace that is shorter than one-sixth the length of the signal’s rising or falling edge, the circuit seldom needs to be considered to be a transmission line. Traces that are much longer than one-quarter the length of the fastest edge will start to behave as transmission lines, exhibiting reflections of the signal when the transition gets to the far end of the trace and is reflected back to the near end. Once the trace is about half of the length it takes for a logic transition to propagate, the problems become quite pronounced.

Let’s look at an example. A logic device on a standard glass-epoxy printed circuit board has a 2 nS rise time.

This signal has a rising edge that is:

(2 nS)/(150 pS/in) = ~13 inches long.

That means a trace that is one-sixth that length, or about two inches or less, does not have to be considered as a transmission line. If the trace is much longer than two inches, it will begin to show significant distortions on the rising and falling edges due to the fact that there is a different signal voltage at each end of the trace at the same instant, resulting in reflections of the signal from the ends of the trace.

This is one of the most important reasons for using logic that is fast enough, and not too much faster than required to meet the timing requirements. While it might seem tempting to buy the fastest device available to reduce the delays in a device which does not meet the timing requirements, doing so can result in a lot more difficult problems to solve!

Ground Bounce

Another effect of high-speed signal transitions is called ground bounce. Ground bounce occurs when a large peak current flows through the ground pin of a chip when one or more logic outputs change state and discharge their load capacitances through the chip’s ground pin. While the parasitic inductance of the ground pin may not seem very significant, in the nanohenry (10-9 H)

73CHAPTER THREE

Worst-Case Timing, Loading, Analysis, and Design

range, fast transients can cause large voltages to appear across the ground pin. This occurs most often when multiple bus signal outputs from one chip change state at the same time. The rapid, parallel current pulses which result from charging or discharging stray bus capacitance must be carried through the ground or power pins, which have inductance.

The voltage across an inductor is equal to the inductance times the rate of change of current through the inductor, or:

V = L * di/dt, where

V = instantaneous voltage across the inductor (volts) L = Inductance (henry)

di/dt = Rate of change of current (amperes/sec)

and current i = Q/t (amperes = coulombs per second)

The charge on a capacitor is Q = CV (coulombs = farads * volts)

V = L * C * (delta V) / (delta t) 2 approximately, or

V = L * C * (Voh-Vol) / (Tr )2 using the output voltage and rise time

Because of the high-speed (nS) and large (amperes) peak currents, even the small nanohenry inductance can induce a voltage transient on the order of volts. (The instantaneous voltage across an inductor is V = L * di/dt.) For typical high speed signals nanohenries*amperes/nanoseconds = volts! This effect is minimized by the use of minimum circuit interconnect trace lengths, wider ground traces, power and ground planes, and small, surface mounted IC packages that have very short leads.

For example, a CMOS output driving a 100 pF load with a rise time of

2 nS would induce a voltage across a typical 1 nH inductance of the chip’s ground lead:

V = 1 nH * 100 pF * (4.5 - 0.5 V) / (2 nS) 2 = 0.1 V

While a voltage of 0.1 volt or 100 millivolts may not seem like much, remem­ ber that a part with many outputs, such as a processor, will sometimes switch many outputs at the same time, and the current that flows through those pins all has to flow through a single ground pin. An 8-bit output will cause 0.8 volt pulse or ground bounce. If the processor drives an 8-bit data bus and a 16-bit address bus low at the same time, this would result in a 2.4 volt bounce! The ground bounce voltage across the ground lead inductance results in a different


74EMBEDDED CONTROLLER

Hardware Design

ground voltage reference for the chip while the chip’s ground is bouncing. Needless to say, this ground bounce can cause a logic level to change during the brief pulse, which can cause trouble with circuits, such as clock signals, which are edge sensitive. This is why high-speed logic devices may have mul­ tiple, short ground pins, and may only be available in small, surface mounted packages. To make things even worse, if two devices overlap slightly in time driving the bus, very large current transients may briefly generate even larger currents that in turn generate larger ground bounce pulses. This can disturb several chips on the board at the same time.

The power supply leads are also subject to bounce for exactly the same reasons, and even though the power supply is not used as a logic voltage reference, the resulting drop in the local power supply voltage to the chip can result in errors.

While exact ground lead inductances may prove difficult or impossible to measure, there is always some inductance in the ground lead, and the longer the lead, the greater the inductance. The example above illustrates another reason why it makes sense to avoid logic that is faster then necessary, and to use very short ground and power wires. In fact, high speed PC boards should use separate inner layers of a multi-layer board to provide large ground and power planes, allowing the chips’ power and ground leads to be connected using very short wires.

The magnitude of the bounce depends upon the number and direction of logic transitions, so the noise is also data dependent! This is an apparently intermittent hardware design fault with symptoms that act like a software bug, since it may only happen at certain points in executing a program, with certain data values.

The example also shows why it is so important to maintain sufficient toler­ ance to noise in the logic. This noise tolerance is referred to as noise margin, which is covered in the next section. Noise margin analysis is especially important in a high-speed logic design, to prevent transient logic errors, which are extremely difficult to track down. This is another example of how a proper analysis and worst-case design can save a lot of time and money while delivering much higher quality and ultimately reliability. In the next section, the noise margin analysis process is described in detail.


75CHAPTER THREE

Worst-Case Timing, Loading, Analysis, and Design

Logic Family IC Characteristics and Interfacing

The three most common logic families are:

TTL: transistor-transistor logic (also known as bipolar logic)

NMOS: n-channel metal oxide semiconductor field effect transistor logic

CMOS: complementary (n- and p- channel) MOS logic

All three logic families have versions with TTL compatible inputs, once the most common type, followed by later NMOS and CMOS. Because of its lower power density and relatively high circuit density however, CMOS has become the most common form of logic, particularly in high density and low power battery operated systems. TTL logic uses bipolar transistors requiring input drive currents on the order of hundreds of microamperes to a few milliamperes, depending on the version. Input voltage ranges for TTL level compatible logic are generally 0 to 0.8 volts for logic zero and 2.4 to 5 volts for logic one. Output voltages are from 0 to 0.4 volts for logic zero and 2.8 to 5 volts for logic one. The 0.4 volt difference is called the noise margin voltage because additive noise at or below this level will not change zeros to ones or vice-versa. The logic threshold voltage (VT) or “0/1 decision point” for TTL logic is typically around 1.5 volts. It may range anywhere between 0.8 and 2.0 volts depending upon supply voltage, temperature, and varies from one device to another. For TTL circuits, the noise margin is at least 0.4 volts. Figure 3-10 shows the concepts of noise margin and logic threshold voltages.

Vcc

+5 Volts

Valid One

Valid

VOH min

2.8 Volts

Output

One

'1' Noise Margin

Input

VIH min

2.4 Volts

VT

~1.5 Volts

Undefined

VIL max

0.8 Volts

'0' Noise Margin

VOL max

0.4 Volts

Valid

Zero

Valid Zero

Input

Gnd

0 Volts

Output

Figure 3-10: Typical TTL logic voltages and noise margin.


Figure 3-11: TTL outputs, totem pole and open collector.
TTL and CMOS logic
are available in several versions, each identified by a distinctive prefix in the part number. Some of the more common versions and their prefixes are: 74xx: standard TTL
74LSxx: low power Schottky clamped TTL 74ALSxx: advanced LS TTL
74Fxx: (fast) high speed TTL
74HCxx: high speed CMOS with CMOS compatible inputs (Vt = ~Vcc/2) 74HCTxx: high speed CMOS with TTL compatible inputs (Vt = ~1.5V) 74FCTxx: high speed CMOS with TTL compatible inputs (Vt = ~1.5V) 74ACTxx: advanced high speed CMOS with TTL compatible inputs 74BCTxx: very high speed CMOS/Bipolar with TTL compatible inputs
Active Pull Up Totem Pole
Passive Pull Up Open Collector
Output Pin
Output Pin
From Internal Circuits
Device Package
External Resistor
Device Package
Vcc
Vcc
TTL logic is capable of sinking high currents and is used for driving very fast, large, heavily loaded buses. Both active and passive pull-up output devices are used with TTL. The active pull up, referred to as a totem-pole output uses one transistor to source current and one to sink it. The passive pull-up uses a tran­ sistor to sink current, and a resistor connected to V+ as a current source. If a pull up resistor is not connected to the gate’s output pin, and the collector is connected only to the output pin, it is referred to as an open collector output In both cases, the output
current sinking capa­ bilities are greater than current source capacity. Many devices can sink a few milliamperes, but
can only source hun­ dreds of picoamperes. Figure 3-11 shows both
totem pole and open collector outputs.
76 EMBEDDED CONTROLLER
Hardware Design
Interconnecting different logic families, such as CMOS and TTL, requires the designer to assure the compatibility of the logic signal voltage levels, and adapt the circuit as necessary to maintain appropriate noise margins. The equivalent resistance or impedance of the signal network also has an impact on the noise in a specific circuit. High impedance inputs are more prone to noise than low impedance inputs. The interface design process is illustrated by an example at the end of this chapter.

77CHAPTER THREE

Worst-Case Timing, Loading, Analysis, and Design

Schottky logic (74ALSxx 74LSxx and 74Sxx) incorporates a low Vf (forward voltage drop) Schottky diode across the collector-base junction of a transistor to prevent it from saturating. This increases the speed for turning the transistor off. TTL is generally used where low cost, output drive, and high speed are important, and there is no objection to the relatively high power consumption and resulting heat.

NMOS logic was used for moderate complexity logic ICs such as more mature microprocessors. Most NMOS logic ICs have TTL compatible voltage specs and operate at a lower power and speed than TTL. The power consumed by NMOS lies between TTL and CMOS, as does its speed. The input current is nearly zero since the MOSFETs have extremely high input resistance. Unfortunately, they do have fairly large input capacitance, limiting the circuit speed. The output configurations are similar to TTL except the transistors are n-channel field effect transistors (FETs) rather than bipolar NPN. Both active totem pole and passive (open drain) outputs are used in microprocessor and microcon­ trollers. Because of the constant operating current drain, these devices tend to be limited in size and complexity.

CMOS logic has a significant advantage since it does not use any significant amount of power when it is static (not changing state). Most of the power used in an operating device is due to the charge and discharge of internal capacitance and the current transient when both N and P devices are partially on. As a result, power consumption is a function of clock rate for CMOS devices. Some processors are even designed to take advantage of this fact by incorporating “sleep” or low power modes stopping some or all of the clock operations when nothing important is going on. This is frequently required for battery-operated systems to maintain a reasonable battery life. Another advantage is the standard CMOS logic threshold is one half the supply voltage, and the output voltages tend to be very close to Vcc and ground voltage, resulting in higher noise margins than those of TTL devices. This is particularly important for CMOS devices that operate at reduced power supply voltage. CMOS devices are available which operate at 3 volts or less.

Because CMOS logic is inherently symmetrical, the rise and fall times tend to be nearly equal. The symmetry also results in equal source and sink capabilities. The inherent increase in noise margin makes CMOS less susceptible to noise than TTL and NMOS. Figure 3-12 illustrates this. CMOS devices operating at voltages other than 5 volts, such as 3.3 volts, will have a threshold voltage


78EMBEDDED CONTROLLER

Hardware Design

corresponding to Vcc/2. Some versions of CMOS logic operate with a reduced noise margin in order to have TTL compatible input voltages. This is accom­ plished by artificially lowering the input threshold voltage to 1.5 volts, the same as used for TTL. These TTL input threshold compatible circuits have a T in their number (74HCT, 74BCT, etc.) indicating they have TTL compatible inputs. A series of high-speed logic compatible with the TTL logic family in function and input voltage is the 74HCTxx (High speed CMOS TTL compatible) series. The advantage of the ‘T’ series CMOS devices is they can be driven directly by devices having TTL output voltage levels. The ‘T’ series of CMOS devices has the disadvantage that the noise margin is less than it is for true CMOS compatible inputs due to the shifted threshold voltage. The 74HCxx series is pure CMOS with a threshold voltage of one-half the supply voltage (2.5 volts for a 5 Vcc) and correspondingly higher noise margins. As a result,

a standard TTL output VOHmin of 2.8 volts is not enough to guarantee a logic one value for a 74HCxx gate input.

Vdd

+5 Volts

Valid One

Valid

VOH min

4.5 Volts

Output

One

'1' Noise Margin

Input

VIH min

3 Volts

VT

Undefined

2.5 Volts

VIL max

2 Volts

'0' Noise Margin

VOL max

0.4 Volts

Valid

Zero

Valid Zero

Input

Gnd

0 Volts

Output

Figure 3-12: Typical CMOS logic voltages and noise margin.

Interfacing TTL Compatible Signals to 5 Volt CMOS

Interfacing a CMOS output to a TTL input is a direct connection, as long as the CMOS output is capable of sinking the TTL device’s input low current. Interfacing a TTL output to a standard CMOS input requires the use of at least a pull up resistor. A resistor on the TTL output to Vcc will ensure the output voltage is pulled high enough to guarantee the logic one output signal is interpreted as a logic one by the CMOS input. Another useful technique when