Electronics and Micrprocessor Notes
Electronics and Micrprocessor Notes
ELECTRICAL CONDUCTIVITY
In order of conductivity: superconductors, conductors, semiconductors, insulators
conductors: material capable of carrying electric current, i.e. material which has mobile charge carriers (e.g. electrons, ions,..) e.g. metals, liquids with ions (water, molten ionic compounds), plasma insulators: materials with no or very few free charge carriers; e.g. quartz, most covalent and ionic solids, plastics semiconductors: materials with conductivity between that of conductors and insulators; e.g. germanium Ge, silicon Si, GaAs, GaP, InP superconductors: certain materials have zero resistivity at very low temperature.
INTRINSIC SEMICONDUCTORS
semiconductor = material for which gap between valence band and conduction band is small; (gap width in Si is 1.1 eV, in Ge 0.7 eV). at T = 0, there are no electrons in the conduction band, and the semiconductor does not conduct (lack of free charge carriers); at T > 0, some fraction of electrons have sufficient thermal kinetic energy to overcome the gap and jump to the conduction band; fraction rises with temperature; e.g. at 20o C (293 K), Si has 0.9x1010 conduction electrons per cubic centimeter; at 50o C (323 K) there are 7.4x1010 .
Intrinsic semiconductor
electrons moving to conduction band leave hole (covalent bond with missing electron) behind; under influence of applied electric field, neighboring electrons can jump into the hole, thus creating a new hole, etc. holes can move under the influence of an applied electric field, just like electrons; both contribute to conduction. in pure Si and Ge, there are equally many holes (p-type charge carriers) as there are conduction electrons (ntype charge carriers); pure semiconductors also called intrinsic semiconductors.
N-Type material
donor (n-type) impurities:
dopant with 5 valence electrons (e.g. P, As, Sb) 4 electrons used for covalent bonds with surrounding Si atoms, one electron left over; left over electron is only loosely bound only small amount of energy needed to lift it into conduction band (0.05 eV in Si) n-type semiconductor, has conduction electrons, no holes (apart from the few intrinsic holes) example: doping fraction of 10-8 Sb in Si yields about 5x1016 conduction electrons per cubic centimeter at room temperature, i.e. gain of 5x106 over intrinsic Si.
N-TYPE MATERIAL
P-TYPE MATERIAL
acceptor (p-type) impurities:
dopant with 3 valence electrons (e.g. B, Al, Ga, In) only 3 of the 4 covalent bonds filled vacancy in the fourth covalent bond hole p-type semiconductor, has mobile holes, very few mobile electrons (only the intrinsic ones).
P-TYPE MATERIAL
DIODES
p-n JUNCTION:
p-n junction = semiconductor in which impurity changes abruptly from p-type to ntype ; diffusion = movement due to difference in concentration, from higher to lower concentration; in absence of electric field across the junction, holes diffuse towards and across boundary into n-type and capture electrons; electrons diffuse across boundary, fall into holes (recombination of majority carriers); formation of a depletion region (= region without free charge carriers) around the boundary; charged ions are left behind (cannot move):
negative ions left on p-side net negative charge on p-side of the junction; positive ions left on n-side net positive charge on n-side of the junction electric field across junction which prevents further diffusion
Diode
PN Junction
DIODE
diode = biased p-n junction, i.e. p-n junction with voltage applied across it forward biased: p-side more positive than n-side; reverse biased: n-side more positive than p-side; forward biased diode:
the direction of the electric field is from p-side towards n-side p-type charge carriers (positive holes) in p-side are pushed towards and across the p-n boundary, n-type carriers (negative electrons) in n-side are pushed towards and across n-p boundary current flows across p-n boundary
DIODE
FORWARD BIASED
REVERSE BIASED
reverse biased diode: applied voltage makes n-side more positive than p-side electric field direction is from n-side towards pside pushes charge carriers away from the p-n boundary depletion region widens, and no current flows
diode only conducts when positive voltage applied to pside and negative voltage to n-side diodes used in rectifiers, to convert ac voltage to
REVERSE BIASED
ZENER DIODES
ZENER DIODES
The simplest of all voltage regulators is the zener diode voltage regulator. A zener diode is a special diode that is optimized for operation in the breakdown region.
Simplest rectifier
Simplest rectifier resistive load
Simplest rectifier
VOLTAGE REGULATION
A voltage regulator circuit automatically maintains the output voltage of a power supply constant, regardless of a change in the load - a change in the source voltage
Unit-2
TRANSISTORS
(bipolar) transistor = combination of two diodes that share middle portion, called base of transistor; other two sections: emitter'' and collector; usually, base is very thin and lightly doped. two kinds of bipolar transistors: pnp and npn transistors pnp means emitter is p-type, base is n-type, and collector is ptype material; in normal operation of pnp transistor, apply positive voltage to emitter, negative voltage to collector;
TRANSISTORS
PNP TRANSISTOR
PNP TRANSISTOR
if emitter-base junction is forward biased, holes flow from battery into emitter, move into base; some holes annihilate with electrons in ntype base, but base thin and lightly doped most holes make it through base into collector, holes move through collector into negative terminal of battery; i.e. collector current flows whose size depends on how many holes have been captured by electrons in the base; this depends on the number of n-type carriers in the base which can be controlled by the size of the current (the base current) that is allowed to flow from the base to the emitter; the base current is usually very small; small changes in the base current can cause a big difference in the collector current;
PNP TRANSISTOR
Operation as amplifier
Transistor acts as amplifier of base current, since small changes in base current cause big changes in collector current. transistor as switch: if voltage applied to base is such that emitter-base junction is reverse-biased, no current flows through transistor -- transistor is off therefore, a transistor can be used as a voltage-controlled switch; computers use transistors in this way.
Triacs
A triac is a bi-directional thyristor used to control the power in ac circuits. A triac has two leads designated MT1, and MT2 or A1 and A2. A triac has a gate lead which is used to control its conduction. A triac is equivalent to two SCRs in parallel.
Triacs
TRIACS
Unijunction Transistors
The unijunction transistor (UJT) is a three-terminal semiconductor device that has only one p-n junction. The unijunction transistor (UJT) has two base leads, B1 and B2 and an emitter (E) lead. The interbase resistance, RBB of a UJT is the resistance of its n-type silicon bar. The ratio RB1/(RB1 + RB2) is called the intrinsic standoff ratio, designated . UJTs are used in conjunction with SCRs and Triacs to control their conduction angle.
Application
Fig. 32-13 shows how a UJT can be used as a relaxation oscillator. Because the voltage waveform, VB1 is a sharp pulse of short duration, it is the ideal gate triggering source for either an SCR or triac.
Unit-3
DIGITAL ELECTRONICS
DIGITAL
Digital system is known as any electronic system that handle and process electrical signals in the form of 0s and 1s, no more analog signals used here.
Logic gates
A logic gate is an elementary building block of a digital circuit. logic gate is an electronic circuit can perform specific processing on the input signals. Logic gates have two inputs and one output.
A 0 1
Y 1 0
A 0 0 1
B 0 1 0
Y 0 0 0
EX-OR GATE
A 0 0 1 1 B 0 1 0 1 Y 0 1 1 0
NAND GATE
A B Y
1 1
0 1
1 0
In order to separate the address from the data, we can use a latch to save the value before the function of the bits changes
CLK (OUT): An output clock pin to drive the clock of the rest of the system
Demultiplexing AD7-AD0
From the above description, it becomes obvious that the AD7 AD0 lines are serving a dual purpose and that they need to be demultiplexed to get all the information. The high order bits of the address remain on the bus for three clock periods. However, the low order bits remain for only one clock period and they would be lost if they are not saved externally. Also, notice that the low order bits of the address disappear when they are needed most. To make sure we have the entire address for the full three clock cycles, we will use an external latch to save the value of AD7 AD0 when it is carrying the address bits. We use the ALE signal to enable this latch.
Demultiplexing AD7-AD0
8085
A15-A8 ALE AD7-AD0 Latch
A7- A0
D7 - D0
Given that ALE operates as a pulse during T1, we will be able to latch the address. Then when ALE goes low, the address is saved and the AD7 AD0 lines can be used for their purpose as the bidirectional data lines.
Machine Cycle: The time required to complete one operation of accessing memory, I/O, or acknowledging an external request.
This cycle may consist of 3 to 6 T-states.
The ALU
In addition to the arithmetic & logic circuits, the ALU includes the accumulator, which is part of every arithmetic & logic operation. Also, the ALU includes a temporary register used for holding data temporarily during the execution of the operation. This temporary register is not accessible by the programmer.
Z-zero flag
Set if the result of the ALU operation is 0. Otherwise is reset. This flag is affected by operations on the accumulator as well as other registers. (DCR B).
AC-Auxiliary Carry
This flag is set when a carry is generated from bit D3 and passed to D4 . This flag is used only internally for BCD operations. (Section 10.5 describes BCD addition including the DAA instruction).
P-Parity flag
After an ALU operation if the result has an even # of 1s the p-flag is set. Otherwise it is cleared. So, the flag can be used to indicate even parity.
CY-carry flag
Discussed earlier
It is also possible for an instruction to have 6 T-states in an opcode fetch machine cycle
The 8085 needs to read these two bytes from memory before it can execute the instruction. Therefore, it will need at least two machine cycles.
The first machine cycle is the opcode fetch discussed earlier. The second machine cycle is the Memory Read Cycle. Figure 3.10 page 83.
Memory interfacing
There needs to be a lot of interaction between the microprocessor and the memory for the exchange of information during program execution.
Memory has its requirements on control signals and their timing. The microprocessor has its requirements as well.
RAM
Input Buffer WR Address Lines CS CS
Address Lines
RD
Data Lines
Interfacing Memory
Accessing memory can be summarized into the following three steps:
Select the chip. Identify the memory register. Enable the appropriate buffer.
Address decoding
The result of address decoding is the identification of a register for a given address.
A large part of the address bus is usually connected directly to the address inputs of the memory chip. This portion is decoded internally within the chip. What concerns us is the other part that must be decoded externally to select the chip. This can be done either using logic gates or a decoder.
Interfacing concepts
Interfacing concepts together
8085
A15-A8
ALE
CS
A15- A10
A9- A0
AD7-AD0 Latch
A7- A0
WR RD
IO/M
D7 - D0
RD WR
TEMPERATURE CONTROLLER
To accurately control process temperature without extensive operator involvement, a temperature control system relies upon a controller, which accepts a temperature sensor such as a thermocouple or RTD as input. It compares the actual temperature to the desired control temperature, or setpoint, and provides an output to a control element. The controller is one part of the entire control system, and the whole system should be analyzed in selecting the proper controller. The following items should be considered when selecting a controller: Type of input sensor (thermocouple, RTD) and temperature range Type of output required (electromechanical relay, SSR, analog output) Control algorithm needed (on/off, proportional, PID) Number and type of outputs (heat, cool, alarm, limit)
TEMPERATURE CONTROLLER
There are three basic types of controllers: onoff, proportional and PID. Depending upon the system to be controlled, the operator will be able to use one type or another to control the process. On/Off Control An on-off controller is the simplest form of temperature control device. The output from the device is either on or off, with no middle state. An on-off controller will switch the output only when the temperature crosses the setpoint. For heating control, the output is on when the temperature is below the setpoint, and off above setpoint. Since the temperature crosses the setpoint to change the output state, the process temperature will be cycling continually, going from below setpoint to above, and back below. In cases where this cycling occurs rapidly, and to prevent damage to contactors and valves, an on-off differential, or hysteresis, is added to the controller operations.
TEMPERATURE CONTROLLER
This differential requires that the temperature exceed setpoint by a certain amount before the output will turn off or on again. On-off differential prevents the output from chattering or making fast, continual switches if the cycling above and below the setpoint occurs very rapidly. On-off control is usually used where a precise control is not necessary, in systems which cannot handle having the energy turned on and off frequently, where the mass of the system is so great that temperatures change extremely slowly, or for a temperature alarm. One special type of on-off control used for alarm is a limit controller. This controller uses a latching relay, which must be manually reset, and is used to shut down a process when a certain temperature is reached
THANKYOU