CH-3 MICROCONTROLLERS
Marks: 08 (12)
Introduction to microcontrollers:
The microcontroller is a complete microprocessor system built on single integrated circuit. It consists of microprocessor and limited amount of RAM, ROM and I/O. Building complete microprocessor system on single chip reduces the cost of building simple products.
A microcontroller is a small and low-cost microcomputer, which is designed to perform the specific tasks of embedded systems like displaying microwave’s information, receiving remote signals, etc. Another name for a microcontroller, therefore, is “embedded controller".
Microcontrollers are dedicated to one task and run one specific program. The program is stored in ROM (read-only memory) and generally does not change. Microcontrollers are often low-power devices.
A desktop computer is almost always plugged into a wall socket and might consume 50 watts of electricity. A battery-operated microcontroller might consume 50 milliwatts..
Advantages of microcontroller over microprocessor:
Microcontroller is a single chip microcomputer so it can be used for dedicated functions.
As all the peripherals of microcontroller are on single chip it is compact while microprocessor is bulky.
Low cost than microprocessor based system. So it can be used in low cost products like toys.
Microcontrollers have RAM, ROM, EEPROM embedded in it while we have to use external circuits in case of microprocessor.
Low power consumption as compared to microprocessor.
Microcontrollers are compact and less complex than microprocessor system
Disadvantages of microcontroller-
The microcontroller cannot interface high power devices directly.
It has more complex structure as compared to microprocessor.
It only performed limited number of executions simultaneously.
It is generally used in micro equipment.
Difference/Comparison between Microcontroller and Microprocessor:
The architecture of microcontroller 8051:
The 8051 is a second generation 8-bit microcontroller. The first 8-bit microcontroller was 8048. 8051 provides a significantly more powerful architecture, more powerful instruction set and full serial port. The major features of 8051 are as-
An 4-bit ALU
4k x 8 (4KB) ROM
128 x 8 (128B) RAM
Dual 16-bit timer event counter
32 I/O lines
Addresses 64KB of data memory
Powerful instruction set (111 instruction)
Full featured serial port
Up to 12MHz clock
Two external interrupts
Figure shows 8051 architectural block diagram. There are 32 pins needed by four 8-bit bi-directional I/O ports. Eight additional pins provide power, allow to connect clock crystal and provide timing and control signals. 8051 is 40 pin IC.
The centre of this diagram shows the 8051 CPU and outside shows the I/O ports. The internal view of 8081 is complex. It consists of ALU, accumulator, stack pointer, a block of registers. All these devices are connected to 8-bit internal data bus.
Each I/O port is also connected to the 8-bit internal data bus through a series of register. These registers hold data during I/O transfers and control I/O ports. The block diagram also shows ROM and RAM.
Overview of other microcontrollers:
8048 is the first Intel microprocessor. The architecture of 8048, 8049 and 8050 are similar but memory size is different. It doubles in each case. 8048 supports 1KB of internal memory, 8049 supports 2KB and 8050 supports 4KB.
8052 is a simple expansion of 8051. 8052 has 8KB of onboard ROM and 256 bytes of on board RAM. 8052 allows programmers to larger programs and that can use more data. The cost of 8052 is more than that of 8051. The 8052 has one extra 16-bit counter-timer. It gives more flexibility.8051 and 8052 have on board ROM. These are normally used in high volume application.
For low volume and prototyping applications 8751 and 8752 are used. They use EPROM instead of ROM. Using EPROM memory; the user can erase program memory with ultra violet light and can reprogram memory.
Two alternative versions of 8051 and 8052 are 8031 and 8032. These devices do not have on board ROM. So external ROM has to be used for program memory. These are excellent devices for prototyping and low volume products.
The third form 8052 is 8052 AH-BASIC. This special 8052 has BASIC programming language in ROM. Using BASIC instructions, programmer can write instructions for 8052, rather than assembly language.
Applications of microcontrollers:
Temperature sensing and controlling devices like microwave oven, chimneys.
Fire detection and safety devices like Fire alarm.
Microcontrollers are used as machine tools, chemical processors and in medical instruments.
In low cost products such as toys, electric drills, VCRs.
In mechanism of electronic systems like music system, CD/DVD players ,home security systems etc.
In mobile phones, auto-mobiles, washing machine, cameras etc.
In modems and keyboard controllers of computers.
Questions
Marks wise Questions: 1M(1), 3M(1), 4M(2)
1. Fill in the blanks with given alternatives.
8051 is a --------- bit microcontroller.
(a) 4 (b) 8 (c) 16
8051 has ------------ RAM.
(a) 128 x 8 (b) 4K x 8 (c) 256 x 8
8051 has --------- ROM.
(a) 128 x 8 (b) 4K x 8 (c) 256 x 8
8052 has ---------- ROM.
(a) 8K x 8 (b) 4k x 8 (c) 128 x 8
Microcontroller 8051 has ----------- external interrupts.
(a) 2 (b) 3 (c) 4
----------- is a characteristics feature of 8051 microcontroller.
(a) Four 8-bit I/O ports (b) Tow8-bit I/O ports (c) 4KB RAM
----------- is a microcontroller chip.
(a) 8085 (b) 8086 (c) 8051
Internal data memory of 8051 microcontroller is ----------.
(a) 128 bytes (b) 4K bytes (c) 128K bytes
---------- is not a microcontroller.
(a) 8052 (b) 8051 (c) Pentium
The 8051 microcontroller has an instruction set of ----------- instructions.
(a) 99 (b) 111 (c) 74
In ----------- microcontroller on board EPROM is used.
(a) 8051 (b) 8052 (c) 8048
---------- IC consists internal RAM.
(a) 8085 (b) 8051 (c) 8086
2. Answer the following.
What is microcontroller?
What are the advantages of microcontroller over microprocessor?
Draw diagram of 8051 architecture.
What are major features of 8051?
Compare microcontroller and microprocessor.
Write applications of microcontroller.
Differentiate between 8051 and 8052 microcontroller. OR Compare 8052 microcontroller with 8051 microcontroller.
Write a short note on overview of other microcontrollers (8051 family).