Académique Documents
Professionnel Documents
Culture Documents
Engineering
COE 4161
Lecture 2
Emmanuel Ndashimye
Agenda
Input/output standards
CPU families used in microcontrollers: 4-
bit, 8-bit, 16-32-bit
Microprocessor evolution
Timers/Counters, GPIO,
Interrupt-driven I/O
Interrupt structures
Input/Output Ports
USB (universal serial bus)
intelligent high-speed connection to devices
up to 480 Mbit/s (USB 2.0 Hi-Speed)
USB hub connects multiple devices
enumeration: computer queries devices
supports hot swapping, hot plugging
Parallel
short cable, Enhanced PP up to 2 Mbit/s
common for printers, simpler devices
bidirectional, parallel data transfer (IEEE 1284)
Intel 8255 controller chip
3
Input/Output Ports (2)
Serial
one bit at a time
RS-232 (recommended standard 232) serial port
used with long cables (not longer than ~15 m OK)
low speeds (up to 115 kbit/s)
still widely used to interface instruments
additional standards available:
E.g. RS-422/485 differential signals for better
noise immunity, can support speeds in access of
10 Mbit/s (becomes cable-length dependent)
4
Input/Output Ports (3)
IEEE-488 (GPIB)
Has been around for 30 years, many
instruments are equipped with it
Allows daisy-chaining up to 15 devices
Updated versions have speeds up to 10Mbit/s
5
CPU families : 4-bit, 8-bit, 16-32-bit
10
Early Intel Processors
11
….
13
IBM-AT
Intel 80286 (1982)
Still largely a 16-bit processor
16 MB addressable RAM
Protected memory
several times faster than 8086
introduced IDE bus architecture
80287 floating point unit
Up to 20MHz
134K transistors
14
32-bit processors
Motorola 680x0 series
32-bit registers
68010 (1982) adds virtual memory support
Other successors 68020/68030/68040/68060
Popular with UNIX operating systems in late
1980’s/early 1990’s
Faded from computer desktop market, but
had a strong standing in embedded /
controller equipment (still used)
15
IA-32
Intel386 (1985)
4 GB addressable RAM
32-bit registers
paging (virtual memory)
Up to 33MHz
Intel486 (1989)
instruction pipelining
Integrated FPU
8K cache
16
….
Pentium (1993)
Superscalar (two parallel pipelines)
Intel declines to license Pentium to
others, AMD and Cyrix start their own
designs
Intel Pentium Family
Pentium Pro (1995)
advanced optimization techniques in m-code
More pipeline stages
On-board L2 cache
Pentium II (1997)
MMX (multimedia) instruction set
Up to 450MHz
Pentium III (1999)
SIMD (streaming extensions) instructions
(SSE)
Up to 1+GHz
18
…
Pentium 4 (2000)
NetBurst micro-architecture, tuned for
multimedia
3.8+GHz
Pentium D (Dual core)
…
Timer and Counters
What Do You Use Timers For?
Any CPU has a set of instructions that it recognises and responds to; all programs are built up in one
way or another from this instruction set. We want computers to execute code as fast as possible, but
how to achieve this aim is not always an obvious matter.
One approach is to build sophisticated CPUs with exotic instruction sets, with an instruction ready
for every foreseeable operation. This leads to the CISC, the Complex Instruction Set Computer. A
CISC has many instructions, and considerable sophistication. Yet the complexity of the design
needed to achieve this tends to lead to slow operation. One characteristic of the CISC approach is
that instructions have different levels of complexity. Simple ones can be expressed in a short
instruction code, say one byte of data, and execute quickly. Complex ones may need several bytes of
code to define them, and take a long time to execute.
Another approach is to keep the CPU very simple, and have a limited instruction set. This leads to
the RISC approach – the Reduced Instruction Set Computer. The instruction set, and hence overall
design, is kept simple. This leads to fast operation. One characteristic of the RISC approach is that
each instruction is contained within a single binary word. That word must hold all information
necessary, including the instruction code itself, as well as any address or data information also
needed. A further characteristic, an outcome of the simplicity of the approach, is that every
instruction normally takes the same amount of time to execute.
• A microcontroller is an
integrated chip that is often
part of an embedded system.
• Microcontroller includes a
CPU, RAM, ROM, I/O ports,
and timers like a standard
computer
Motorola 68000
PIC 12F508
The Microchip PIC Families
The “PIC” was originally a design of the company General Instruments. It was intended for
simple control applications, hence the name – Peripheral Interface Controller. In the late
1970s General Instruments produced the PIC1650 and PIC 1655 processors. Although the
design was comparatively crude and unorthodox, the PIC was completely stand-alone, and
contained some important and forward-looking features. The simple CPU was a RISC
structure, with a single accumulator (called the “Working Register”, and just 30 instructions.
The output pins could source or sink much more current than most other microprocessors of
the time. Already the trademarks of the PIC were emerging – simplicity, stand-alone, high
speed, and low cost.
General Instruments sold off its semiconductor division to a group of venture capitalists, who
must have realised the immense potential of these odd little devices. Throughout the nineties
the range of available PIC microcontrollers grew, and as they did so they gradually overtook
many of their better-established competitors. In many cases PIC microcontrollers could run
faster, needed a simpler chip-set, and were quicker to prototype with, than their competitors.
Unlike many competitors, Microchip made their development tools simple, and low-cost or
free. Moreover Microchip stayed firmly entrenched in the 8-bit world.
Despite the huge advances that have been made, we can still see features of the old General
Instruments PIC, even in the most recent designs.
Comparison of 8-bit PIC families
End of Lecture