Microcontroller: A microcontroller is a computer with most of the necessary support chips. A microcontroller (MCU for microcontroller unit, also MC, UC, or ฮผC) is a small computer on a single VLSI integrated circuit (IC) chip. A microcontroller contains one or more CPUs (processor cores) along with memory and programmable input/output peripherals onboard.
All computers have several things in common, namely:
- A central processing unit (CPU) that โexecutesโ programs.
- Some random-access memory (RAM) where it can store data that is variable.
- Some read-only memory (ROM) where programs to be executed can be stored.
- Input and output (I/O) devices that enable communication to be established with the outside world i.e. connection to devices such as keyboard, mouse, monitors and other peripherals.
Download & Install EEE Made Easy App
There are a number of other common characteristics that define microcontrollers. If a computer matches a majority of these characteristics, then it can be classified as a โmicrocontrollerโ.
Read Also: 8051 ARCHITECTURE|8051 Microcontroller Architecture
Microcontrollers may be:
- โEmbeddedโ inside some other device (often a consumer product) so that they can control the features or actions of the product.
- Another name for a microcontroller is therefore an โembedded controllerโ.
- Dedicated to one task and run one specific program.
- The program is stored in ROM and generally does not change.
- A low-power device. A battery-operated microcontroller might consume as little as 50 milliwatts.
A microcontroller may take input from the device it is controlling and controls the device by sending signals to different components in the device.
A microcontroller is often small and low-cost. The components may be chosen to minimise size and to be as inexpensive as possible.
The actual processor used to implement a microcontroller can vary widely.
In many products, such as microwave ovens, the demand on the CPU is fairly low
and price is an important consideration.
In these cases, manufacturers turn to dedicated microcontroller chips โ devices that were originally designed to be low-cost, small, low-power, embedded CPUs.
The Motorola 6811 and Intel 8051 are both good examples of such chips.
A typical low-end microcontroller chip might have 1000 bytes of ROM and 20 bytes of RAM on the chip, along with eight I/O pins.
In large quantities, the cost of these chips can sometimes be just a few pence.
In this article, we will introduce the Philips 8051 family of microcontrollers, and show their working, with applications.
The programming of these devices is the same and, depending on the type of device chosen, the functionality of each device is determined by the hardware devices onboard the chosen device.
The predominant family of microcontrollers are 8-bit types since this word size has proved popular for the vast majority of tasks the devices have been required to perform.
The single-byte word is regarded as sufficient for most purposes and has the advantage of easily interfacing with the variety of IC memories and logic circuitry currently available.
The serial ASCII data is also byte sized making data communications easily compatible with the microcontroller devices.
Because the type of application for the microcontroller may vary enormously most manufacturers provide a family of devices, each member of the family capable of fitting neatly into the manufacturerโs requirements.
This avoids the use of a common device for all applications where some elements of
the device would not be used; such a device would be complex and hence expensive.
The microcontroller family would have a common instruction subset but family members differ in the amount, and type, of memory, timer facility, port options, etc. possessed, thus producing cost-effective devices suitable for particular manufacturing requirements.
- Memory expansion is possible with off-chip RAM and/or ROM;
- for some family members, there is no on-chip ROM, or
- the ROMis either electrically programmable ROM (EPROM) or
- electrically erasable PROM (EEPROM) known as flash EEPROM which allows for the
program to be erased and rewritten many times.
Additional on-chip facilities could include analog-to-digital conversion (ADC), digital-to-analog conversion (DAC) and analog comparators.
Some microcontroller family members include versions with lower pin counts for more basic applications to minimize costs.
Philips 8051 microcontrollers
The Philips products are identified by the numbering system: 8XCXXX
where in general, since there are exceptions, the digit following the 8 is:
- 0 for a ROMless device
- 3 for a device with ROM
- 7 for a device with EPROM/OTP (one-time programmable)
- 9 for a device with FEEPROM (flash).
Following the C there may be 2 or 3 digits.
Additional digits, not shown above, would include such factors as clock speed, pin count, package code and temperature range.
Philips also produces a family of 16-bit microcontrollers in the eXtended Architecture (XA) range.
For these devices Philips claims compatibility with the 80C51 at source code level with full support for the internal registers, operating modes and 8051 instructions.
Also claimed is a much higher speed of operation than the 8051 devices.
The XA products are identified by the numbering system: PXAG3XXXX, where:
- PXA is Philips 80C51 XA
2) G3 is the derivative name
3) next digit is memory option:
0 = ROM less
3 = ROM
5 = Bond-out (emulation)
7 = EPROM/OTP
9 = EEPROM (Flash)
4) next digit is speed:
J = 25MHz
K = 30MHZ
5) next digit is temperature:
B = 0oC to + 70oC
F = -40oC to + 85oC
6) final digit is package code:
A = Plastic Leaded Chip Carrier (PLCC)
B = Quad Flat Pack (QFP)
XA architecture
The XA architecture supports
- 16-bit fully static CPU with a 24-bit program and data address range;
- eight 16-bit CPU registers, each capable of performing all arithmetic and logic operations as well as acting as memory pointers;
- both 8-bit and 16-bit CPU registers, each capable of performing all arithmetic and logic operations;
- an enhanced instruction set that includes bit-intensive logic operations and fast signed or unsigned 16 16 multiplies and 32/16 divide;
- instruction set tailored for high-level language support;
- multitasking and real-time executives that include up to 32 vectored interrupts, 16 software traps, segmented data memory and banked registers to support context switching.
P89C66x microcontroller
The figure below shows a P89C664 microcontroller in a PLCC package.
- P means the device is manufactured by Philips Semiconductors
- 8 means the micro belongs to the 8-bit 8051 family
- 9 means Flash code (program) memory
- C means CMOS technology and
- 664 belongs to the 66xfamily where:
- x = 0, 16KB Flash code memory, 512 bytes onboard RAM
- x = 2, 32KB Flash code memory, 1KB onboard RAM
- x = 4, 64KB Flash code memory, 2KB onboard RAM
- x = 8, 64KB Flash code memory, 8KB onboard RAM
All devices belonging to this family of devices have a universal asynchronous receive transmit (UART), which is a serial interface similar to the COM interface on a PC.
The figure given below shows the logic symbol for the device and illustrates the pin functions.
80C51 microcontrollers
The P89C66xfamily of microcontrollers has four 8-bit ports: port 0, port 1, port 2 and port 3.
Traditionally in the 80C51 family of microcontrollers, the function of port 0 and port 2 is primarily to allow for connection to an external PROM (code memory chip).
Port 0 provides both the 8-bit data and the lower 8 bits of the address bus, A0 to A7.
Port 2 provides the upper 8 address bits, A8 to A15.
All of the flash microcontrollers referred to in this text have onboard code memory,
which can be as much as 64 KB.
Port 0 pins are all from open-drain transistors and the port pins should have pull-up resistors (e.g. 2.7 k ohm from pin to 5V DC supply) if the port is to be used as a general-purpose interface.
Port 3 has some special function pins, e.g. pins 0 and 1 of port 3 may be used as receive and transmit for the UART.
In the 80C51 family of microcontrollers, the RAM is organized into 8-bit locations.
The bits are numbered 7, 6, 5, 4, 3, 2, 1, 0 where bit 7 is the most significant bit
(MSB) and bit 0 the least significant bit (LSB).
A bit (binary digit) has two values, logic 0 or logic 1. Electrically logic 0 is 0V
whereas logic 1 is the value of the microcontroller IC positive supply voltage.
Logic 1 is usually 5V but nowadays with the increasing use of batteries for power
supplies logic 1 could be 3V or 1.8 V.
Power depends on the square of the voltage and there is a significant saving
in power (i.e. battery lasts longer) if the microcontroller is powered by 3V or
1.8V power supplies.
The maximum number that can be stored in an 8-bit memory location is
28 – 1, which equals 255. This would occur when all the bits are equal to 1 i.e.:
Binary is a base 2 number system and the electronic devices in the microcontrollerโs
logic circuits can be set to logic 0 and logic 1.
The value of each bit is:
Example problem
Show that if an 8-bit register contains all logic 1s then the value stored is 255.
Solution
With all bits of the register set to logic 1 the total value stored is given by:
128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255
Remember the sequence by recalling that the LSB is 1 and the other numbers are successively doubled.
Types of microcontroller
Microcontrollers can be categorized on the basis of architecture and service providers.
On the basis of architecture, the types of microcontrollers are:
On the basis of Service Provider or Vendor, the types of microcontrollers are:
- AVR
- PIC
- Hitachi
- Motorola
Read Also : Features of AVR|AVR Microcontrollers
Read more about Microcontrollers
- Features of AVR|AVR Microcontrollers
- 8051 ARCHITECTURE|8051 Microcontroller Architecture
- 8051 Microcontroller Architecture|RISC and CISC CPU Architectures|HARVARD & VON- NEUMANN CPU Architecture
- Microprocessor VS Microcontroller| Comparison of Microprocessor and Microcontroller|Difference between Microprocessor and Microcontroller
- Addressing modes of 8051 Microcontroller|8051 Addressing Modes
- 8051 Microcontroller Instruction Set|KSEB Sub Engineer Notes
- 8051 Microcontroller MCQ|8051 Questions and Answers
- Microcontroller|Types of microcontroller
- 8051 Microcontroller Notes pdf|8051 microcontroller pdf
- Interrupts in 8051|Interrupts in 8051 Microcontroller
Books for Microcontroller 8051
- KSEB Sub Engineer and AE Books
- The 8051 Micro controller 3rd Edition,by Kenneth Ayala
- The 8051 Microcontrollers & Embedded Systems, by Mazidi
- 8051 MICROCONTROLLER AND APPLICATIONS FOR BSC
- Microcontroller & Embedded Systems for BE
- [PDF] Syllabus Workshop Instructor Tool and Die|242/2023 syllabus Kerala PSC
- [PDF]Junior Instructor Technician Mechatronics Syllabus|654/2023 syllabus Kerala PSC
- [PDF]Tracer in Soil Survey and Soil Conservation Syllabus|600/2023 Syllabus Kerala PSC
- [PDF] Junior Instructor Fitter Syllabus|659/2023 syllabus Kerala PSC
- [PDF] Junior Instructor Turner Syllabus|661/2023 Syllabus Kerala PSC
- [PDF] Technical Supervisor Travancore Sugars and Chemicals Syllabus|693/2023 syllabus Kerala PSC
- [PDF]AE Electrical Universities Syllabus|070/2024 syllabus Kerala PSC