Ec09 505 Microprocessors and Microcontrollers: Prepared by Lekha Pankaj Asst - Professor ECE Dept
Ec09 505 Microprocessors and Microcontrollers: Prepared by Lekha Pankaj Asst - Professor ECE Dept
INTRODUCTION
Prepared by Lekha Pankaj Asst.Professor ECE Dept.
General Definitions
A Computer is a programmable machine. The two principal characteristics of a computer are: It responds to a specific set of instructions in a well defined manner. It can execute a prerecorded list of instructions (a program ). The actual machinery wires, transistors, and circuits is called hardware. the instructions and data are called software. Memory: Enables a computer to store, at least temporarily, data and programs. Mass storage device :Allows a computer to permanently retain large amounts of data. Common mass storage devices include disk drives and tape drives.
General Definitions
The heart of the computer, this is the component that actually executes instructions.
Minicomputer : A multi-user computer capable of supporting from 10 to hundreds of users simultaneously. Mainframe : A powerful multi-user computer capable of supporting many hundreds or thousands of users simultaneously. Supercomputer : An extremely fast computer that can perform hundreds of millions of instructions per second.
General Definitions
A microcomputer contains a CPU on a microchip (the microprocessor), a memory system (typically ROM and RAM), a bus system and I/O ports, typically housed in a motherboard. A microprocessor is a digital electronic component with miniaturized transistors on a single semiconductor integrated circuit (IC). One or more microprocessors typically serve as a central processing unit (CPU) in a computer system or handheld device.
Microprocessor
The key element of all computers, providing the mathematical and decision making ability Current state-of-the-art uPs (Pentium, Athlon, SPARC, PowerPC) contain complex circuits consisting of tens of millions of transistors. They operate at ultra-fast speeds doing over a billion operations very second. Made up from a semiconductor, Silicon. uPs are powerful pieces of hardware, but not much useful on their own. Just as the human brain needs hands, feet, eyes, ears, mouth to be useful; so does the uP.
MICROPROCESSORS
Three basic characteristics differentiate Microprocessors: Instruction set: The set of instructions that the microprocessor can execute. (RISC and CISC) Bus width : The number of bits processed in a single instruction. Clock speed : Given in megahertz (MHz), the clock speed determines how many instructions per second the processor can execute.
MICROPROCESSORS
MICROCONTROLLERS
Microcontroller: A highly integrated chip that contains all the components comprising a controller. Typically this includes a CPU, RAM, some form of ROM, I/O ports, and timers. A microcontroller is designed for a very specific task - to control a particular system. A microcontroller is meant to be more self-contained and independent, and functions as a tiny, dedicated computer. They are generally not that powerful, cost a few dollars a piece, and are found embedded in video games, VCRs, microwave ovens, printers, autos, etc.
MICROCONTROLLERS
MICROPROCESSORS VS MICROCONTROLLERS
A microprocessor is a general-purpose chip that is used to create a multifunction computer or device and requires multiple chips to handle various tasks whereas a microcontroller is designed for a very specific task - to control a particular system. The great advantage of microcontrollers, as opposed to using larger microprocessors, is that the parts-count and design costs of the item being controlled can be kept to a minimum. Microcontrollers are typically designed using CMOS (complementary metal oxide semiconductor) technology, an efficient fabrication technique that uses less power and is more immune to power spikes than other techniques.
MICROPROCESSORS VS MICROCONTROLLERS
QUESTION: Why do we ever build just uPs? Why not just build micro-controllers that contain everything on chip?
IMPORTANT TERMINOLOGIES
Bit is a binary digit that can have the value 0 or 1 A byte is defines as 8 bits A nibble is half a byte A word is two bytes A double word is four bytes A kilobyte is 2^10 bytes (1024 bytes), The abbreviation K is most often used
A megabyte or meg is 2^20 bytes, it is exactly 1,048,576 bytes A gigabyte is 2^30 bytes
FIRST COMPUTER
The Babbage Difference Engine It all started with the 1832 Babbage mechanical machine to calculate the navigation tables for the Royal Army, U.K. 25,000 parts
ENIAC
Vacuum tube based BIG BRAIN 1,800 sq. Feet area 30 ton 18000 vacuum tubes Application: IInd WW 1943 First electronic computer is used to decode the German Army secret codes. 1946 First General Purpose computer: ENIAC 17000 vacuum tubes, 500 miles of wire 30 tons, 100 000 ops per sec.
The
st 1
10-micron process
As powerful as the ENIAC which had 18000 tubes and occupied a large room
Moores law
The number of transistors that can be placed inexpensively on an integrated circuit doubles approximately every two years. This trend has continued for more than half a century and is expected to continue until 2015 or 2020 or later. The law is named after Intel cofounder Gordon E. Moore, who described the trend in his 1965 paper. The paper noted that the number of components in integrated circuits had doubled every year from the invention of the integrated circuit in 1958
Year of release
1978 1979 1982 1982 1985 1989 1993 1995 1997 1999 2004 2005 2006
2007
19
SYSTEM BUS
DATA BUS bi-directional ADDRESS BUS uni-directional CONTROL BUS has signals travelling in both directions, and some signals may be bi-directional as well
Processor Activity
System Clock
Place on the address bus, the address of the memory location whose content is to be read .This action is performed by the processor. Assert the memory read signal which is part of the control bus. Wait until the content of the addressed location appears on the data bus. Transfer the data on the data bus to the processor De-activate the memory read signal .The memory read operation is over and the address on the address bus is not relevant anymore
Place on the address bus, the address of the location to which data is to be written. On the data bus, place the data to be written. Assert the memory write signal which is part of the control bus. Wait until the data is stored in the addressed location. De-activate the memory write signal .This ends the memory write operation.
Every Peripheral device (I/O devices) work at different operating conditions( voltage, speed etc) Processor finds it difficult to directly deal with these devices A controller is used to interface between the peripheral and the processor The controller provides the required control signals to the processor to communicated with the peripheral. Egs are keyboard display interfacing chip, parallel port and serial port interfacing chips etc
COMPUTER LANGUAGES
CISC Complex instruction set Computer Conventional design Larger and complex instructions Completely uses the hardware Eg: Multiply instruction uses the multiplier hardware
Hardware is fast and hence higher execution speed. Hardware Budget is high Complexity of hardware increases
Hardware budget is much less. Larger software to be written to realize complex instructions with simple instructions.
At present several RISC processors have complex instructions implemented using microprogramming rather than direct hardware realization.
NUMBER SYSTEMS
Decimal Binary Hexa decimal Binary Coded Decimal (BCD)-packed and unpacked Conversions between them is possible Arithmetic operations using all these number systems are possible
Negative numbers are represented in twos complement form, and all arithmetic can be done in this form
36
When hexadecimal numbers of different lengths are added, their length should be made the same, by sign extending the number of smaller length A byte should be extended to a word, to add the byte to a word A word should be extended to a double word, in order to add it to a double word
28 = 256 bytes 210 = 1024 bytes = 1KiloByte or 1KB 26 210 = 216 = 64 KB = 65,536 bytes
210 210 = 220 = one Mega Byte (1MB) = 1024 1024 = 1,048,576 bytes
210 220 = 230 = one Giga Byte (1 GB) = 1024 1024 1024 = 1,073,741,824 bytes
210 230 = 240 = one Terra Byte (TB) = 1024 1024 1024 1024 = 1,099,511,627,776
Peta Byte (PB) =250 bytes Exa Byte (EB) =260 bytes Zetta Byte (ZB) =270 bytes