




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Microcontroller under graduate b tech
Typology: Study notes
1 / 400
This page cannot be seen from the preview
Don't miss anything!





























































































Lecture-I An Overview of Microprocessor The first question comes in a mind "What is a microprocessor?”. Let us start with a more familiar term computer. A digital computer is an electronic machine capable of quickly performing a wide variety of tasks. They can be used to compile, correlate, sort, merge and store data as well as perform calculations. A digital computer is different from a general purpose calculator in that it is capable of operating according to the instructions that are stored within the computer whereas a calculator must be given instructions on a step by step basis. By the definition a programmable calculator is a computer. Historically, digital computers have been categorized according to the size using the words large, medium, minicomputer and microcomputer. In the early years of development, the emphasis was on large and more powerful computers. Large and medium sized computers were designed to store complex scientific and engineering problems. These computers were accessible and affordable only to large corporations, big universities and government agencies. In the 1960s’ computers were accessible & affordable only to large corporations, big universities & government agencies, In late 1960s, minicomputers were available for use in a office, small collage, medium size business organization, small factory etc. As the technology has advanced from SSI to VLSI & SLSI (very large scale integration & super large scale integration) the face of the computer has changed. It has now become possible to build the control processing unit (CPU) with its related timing functions on a single
chip known as microprocessor. A microprocessor combined with memory and input/output devices forms a microcomputer. As for as the computing power is concerned the 32- bit microcomputers are as powerful as traditional mainframe computers. The microcomputer is making an impact on every activity of mankind. It is being used in almost all control applications. For example analytical and scientific instruments, data communication, character recognition, musical instruments, household items, defence equipments, medical equipments etc. Computers communicate and operate in binary numbers 0 and 1 also known as bits. It is the abbreviation for the term binary digit. The bit size of a microprocessor refers to the number of bit which can be processed simultaneously by the arithmetic circuit of the microprocessor. A number of bits taken as a group are this manner is called word. For example, the first commercial microprocessor the Intel 4004 which was introduced in 1971 is a 4-bit machine and is said to process a 4-bit word. A 4-bit word is commonly known as nibble and an 8-bit word is commonly known as byte. Intel 8085 is an 8-bit microprocessor. It should be noted that a processor can perform calculations involving more than its bit size but takes more time to complete the operation. The short word length requires few circuitry and interconnection in the CPU.
Microcomputers: In a very general a microcomputer is best regard as a system incorporating a CPU and assisted hardware whose purpose is to manipulate data in same fashion. This is exactly what any digital
in same way, depends on its input, the way input and output are related is decided by the program that gets executed. Therefore, a μc is an assembly of devices including a CPU, which manipulate data depending on one or more inputs and according to a program, in order to generate one or more output.
There are several standards for logic ‘1’ and logic ‘0’. A) TTL logic 0V-0.8 V → logic ‘0’ 2.4 V-5.2V → logic ‘1’
B) 20 mA current loop Zero current → logic ‘0’ 20 mA current → logic ‘1’
C) RS-232 C +3V to +15V → logic ‘0’ -5V to +15V → logic ‘1’ For microprocessor and most of its peripherals, TTL logic levels are used. 20 mA current loops are used for TTY and RS-232 C is used for serial data communication.
Microcontrollers A μP does not have enough memory for program and data storage, neither does it has any input and output devices. Thus when a μP is used to design a system, several other chips are also used to make up a complete system. For many applications, these extra chips imply additional cost and increased size of the product. For example, when used inside a toy, a designer would like to minimize the size and cost of the electronic equipment inside the toy.
Therefore, in such applications a microcontroller is used more often than a microprocessor. A microcontroller is a chip consisting of a microprocessor, memory and an input/output device. There are 4 bit as well as 32 bit microcontrollers.
Evolution of the Microprocessors The history of the μP development is very interesting. The first μP was introduced in 1971 by Intel Corporation. This was the Intel 4004, a processor on a single chip. It had the capability of performing simple arithmetic and logical operations. E.g. Addition, subtraction, comparison, logical AND and OR. It also had a control unit which could perform various control functions like fetching an instruction from the memory, decoding it and generating control pulses to execute it. It was a 4 bit μP operating on 4 bits of data at a time. The processor was the central component in the chip set, which was called the MCS-4. The other components in the set were a 4001 ROM, 4002 ROM and a 4003 shift register. Shortly after the 4004 appeared in the commercial market place, there is other general purpose μP were introduced. These devices were the Rockwell International 4 bit PPS-4, the Intel 8 bit 8008 and the National Semiconductor 16 bit IMP-16. Other companies had also contributed in the development of μP. The first 8 bit μP, which would perform arithmetic and logic operations on 8 bit words, was introduced in 1973, by Intel. This was 8008 that was followed by an improved version- the 8080 from the same company. The μPs introduced between 1971and 1972 were
Later, Intel initialized the HMOS technology to fabricate the 8085A. Thus, Intel offers a high speed version of the 8085A called 8085AH. The third generation introduced in 1978 is typically separated by the Intel 8086 iAPX 8086 iAPX 80186, iAPX 80286 Zilog 78000,
and the Motorola 68000 which are 16- bit (^) s with minicomputer like performances. One of the most popular 16 bit μP has been introduced by Intel, which is 8088. The 8088 has the same introduction set as the 8088. However, it has only an 8 bit data bus. The 8088 is the μP used in the IBM PC and its clones.A precursor to these microprocessors was the 16-bit Texas instruments 9900 microprocessor introduced in 1976. The latest microprocessor has the word length of 32-bit. Example of 32-bit microprocessors are Intel iAPX 80386, iAPX 432, Motorola MC68020, National semiconductor NS 32032. The characteristic for few microprocessors introduced by Intel are given in the Table. This shows that power of microprocessors has increased tremendously with advancement in integrated circuit technology & microprocessor systems architecture. Very large & cute integration, VLSI allow extremely complex system consisting of as many as a million of transistors on a single chip to be realized. In 1980, the fourth generation μPs were evolved. Intel introduced the first commercial 32 bit microprocessor, Intel 432. This μP was discontinued by Intel due to some problem. Since 1985, more 32bit μPs have been introduced. These include the Motorola MC 68020/68030/68040 and Intel 80386/80486. These processors are fabricated using the low power version of HMOS technology called
HCMOS, and they include an on-chip RAM called the cache memory to speed up program execution. Table evaluation of major characteristics. 4004 8008 8085A 8086 80386 Data 71 71 77 78 85
Lass 4-bit 8 8 16 32
Technology PMOS PMOS NMOS HMOS CHMOS
Record size data/ must
Address capacity
Clock kHz/phase
Add time (^) 10.8 s 20 s 1.3 s 0.375 s 0.125 s
Internal reg. al/gp
Tale size 312 714 RWM RWM RWM
Records/ bits 150- 10,5*
-9.5v +5V +5V +5V
Voltages 16pin 18pin 40pin 40pin 132pin
Package size introduction
Transition 2300 2000 6200 29000 275000
Chip size (mil)
Manufactures Intel Intel Intel Intel Intel
The performance offered by a32 bit μP is more comparable to that of super computers such as VAX 11. Recently, Intel and Motorola
Lecture- MEMORY: It is a storage device. It stores program data and the results. There are two kind of memories; semiconductor memories & magnetic memories. Semiconductor memories are faster, smaller, and lighter and consume less power. Semiconductor memories are used as the main memory of a computer. Magnetic memories are slow but they are cheaper than semiconductor memories. Magnetic memories are used as the secondary memories of a computer for bulk storage of data and information’s. With the development in technology, semiconductor memories are used everywhere. Let us see how semiconductor memories are developed.
Development of Memory: The smallest unit of information a digital system can store in a binary digit which has a logic value of 0 or 1. A bit of data is stored in electronics devices called a flip – flop or a 1-bit register. A flip – flop is a general memory and has two stable states in which it can remain indefinitely as long as the operating power is not interrupted. The output can be changed only if the input signals allow for it. A very simple type of flip – flop is D- type flip- flop as shown in fig.
DD^ Q
CLK
PR
CLR
It has a single data input D and two input, Q and. Output Q
represents the state of flip- flop; represent the complement of the flip- flop’s state. The logic value at a flip- flop’s D input when a clock signal, CLK occurs is stored in the flip- flop. If the store value is equal to 1 (Q = 1) the flip – flop is set. If the stored value is equal to 0 (Q =
A level triggered flip-flop usually referred to simply as a latch has a clock input that is sensitive to the level of the clock signal. The output of a positive level triggered D flip-flop follows the D input when the clock signal is high. When the edge makes a transition from 1 to 0, the data present at the D input is latched. The output of a negative level triggered D flip-flop follows the input. When the clock is logic ‘0’ and latches the input on a 0 to 1 transition. Thus for a level triggered flip-flop, the output follows the input, when the clock is at the trigger level. During this condition the flip-flop is referred to as being the input data is latched on the transition from the trigger level to the quiescent level.
The D flip-flop shown two additional inputs common to most ICs preset & clear. Both the input is active low signals. Preset & clear are asynchronous input; they affect the state of the flip-flop independent of the clock’s level or transition. Thus preset & clear have over side influence on clock & synchronous input. Logic ‘0’ at the clear input
D Q
CLK
D Q
CLK
7475 CLK
D
Q (+ ve)
Q (‐ ve)
clears it for proper operation preset & clear are not absorbed simultaneously. Examples of latches: Typical examples of transparent latches are 74LS373 & the Intel 8282 shown in fig. Both are functionally similar; however, they are not pin compatible. These octal latches are suitable to latch 8-bit data.
Function table: Output control
Enable G
Input Output L H H H L H L L L L X Q H X X Hi edge
Output enable
STB Input DI
L L X D type latch H X X L
The m- bit of data stored in a register make up a word. A word is simply a number of contiguous bits operated upon or considered by the hardware as a group. The no of bit in the word m is a word length. The m input to the register are provided by an m- bit input data bus and the m- output by an m- bit output data bus. A bus is a number of signal line grouped together because of similarity of function, which connect two or more systems or subsystem. Eight bit register are often called octal registers (examples).
Several equal length registers can be incorporated in a single IC and share a common set of inputs, a common set of inputs and a single clock such as circuit is referred to as a memory. Each register occupies a distinct location, which has a unique numerical address. Thus, memory can be thought of as a collection of addressable registers. Logic is necessary to decode address inputs to ensure that only a single register outputs its contents when data is being read
from the memory, and only a single register has data stored in it when the data is being written into the memory.
The 74LS374s are octal D flip flops with three state of outputs. To store data in them, 8 bits of data are put on the D 0 to D 7 data inputs via the data bus. Then the low to high edge on the clock input will cause the data a D 0 to D 7 to be latched into each flip-flop. the stored value in the D flip-flopis observed at the outputs Q 0 to Q 7 by
making the output enable pin low To select the appropriate memory location, a 4 bit address is input to 74154 (4 Line to 16 Line decoder), which outputs a low pulse
on one of the output lines when the is pulsed low. The timing
of setting up the address bus, data bus and pulsing the line is critical. The following figure shows standard timing diagram bus driven devices. Rather than showing all four address lines and all data lines, they are grouped and X is used to show where any or all of the lines are allowed to change digital levels.
The address and the data lines must be set up some time (ts)
before the low to high edge of. In other words the address and the data lines must be valid some period of time (ts) before the
low to high edge of in order for the74374 to interpret them correctly.
When the line is pulsed, the decoder outputs a low pulse on one of its 16 outputs which clocks the appropriate memory location to receive data from the data bus. After the propagation delay, (tp) the data output at Q 0 to Q 7 will be the new data just entered into the D flip-flop. Then the t (^) p will include the propagation delay of decoder and of the D flip-flop. In the figure all the three state outputs are continuously enabled so that their Q outputs always active. To reduce the number of lines the 8 outputs Q 0 to Q 7 of all 16 memory locations back to the data
bus. The enables of the 16 memory locations have to be individually selected at the appropriate time to avoid a conflict on the data bus, called bus contention. Bus contention occurs when two or more devices are trying to send their digital levels to the shared data bus at the same time. To individually select each group of Q outputs,
the grounds on the enables would be removed and instead be connected to the output of another 74154 1 of 16 decoder.