Page 75 - DCAP210_INTRODUCTION__TO_MICROPROCESSORS
P. 75
Unit 5: Microcomputer System
than 8 bits wide (usually 12, 14, or 16 bits) and the instructions occupy one word in the program Notes
memory. RISC processors (e.g. PIC) have no more than about 35 instructions, and offer higher
speeds. CISC microcontrollers have 8-bit wide instructions and they usually have over 200
instructions. Some instructions (e.g. branch) occupy more than one program memory location.
5.3 Microcontroller Features
Microcontrollers from different manufacturers have different architectures and different
capabilities. Some may suit a particular application while others may be totally unsuitable.
5.3.1 Supply Voltage
Most microcontrollers operate with the standard +5 V supply. Some microcontrollers can operate
at as low as 2.7 V and some will tolerate 6 V without any problems. You should check the
manufacturers’ data sheets about the allowed limits of the supply voltage.
5.3.2 The Clock
All microcontrollers require an oscillator (known as a clock) to operate. Most microcomputers
will operate with a crystal and two capacitors. Some will operate with resonators or with external
resistor capacitor pair. Some microcontrollers have built-in resistor–capacitor type oscillators and
they do not require any external timing components (e.g. PIC12C672). If your application is not
time-sensitive you should use external or internal (if available) resistor–capacitor timing
components for simplicity and low cost.
5.3.3 Timers
Timers are an important part of any microcontroller. A timer is basically a counter which is
driven from an accurate clock (or a division of this clock). Timers can be 8-bits or 16-bits long.
Data can be loaded into the timers and they can be started and stopped under software control.
Most timers can be configured to generate an interrupt when they reach a certain count (usually
when they overflow). Some microcontrollers offer capture and compare facilities where a timer
value can be read when an external event occurs, or the timer value can be compared to a preset
value and interrupts can be generated when this value is reached. It is typical to have at least one
timer on every microcontroller. Some microcontrollers may have three or more while others may
have two timers.
5.3.4 Watchdog
Many microcontrollers have at least one watchdog facility. The watchdog is usually refreshed by
the user program and a reset occurs if the program fails to refresh the watchdog. Watchdog
facilities are commonly used in real-time systems where it is required to check the proper
termination of one or more activities.
5.3.5 Reset Input
This input resets the microcomputer. Most microcontrollers have a resistor connected to the supply
voltage and this ensures that the microcontroller starts properly after the application of power.
Some microcontrollers have internal reset circuitry which does not require any external
components.
5.3.6 Interrupts
Interrupts are a very important concept in microcontrollers. An interrupt causes a microcontroller
to respond to external and internal (e.g. timer) events very quickly. When an interrupt occurs the
LOVELY PROFESSIONAL UNIVERSITY 69