Você está na página 1de 38

Introduction to Microprocessor

Based Systems
P R I N C I P L E S A N D A P P L I C AT I O N S O F M I C R O C O N T R O L L E R S
LECTURE #1

BY
SANIRA LASANTHA
ICBT KANDY CAMPUS
ACKNOWLEDGEMENT

DR. MALITHA WIJESUNDARA


D E A N - A C A D E M I C A F FA I R S
SLIIT

Aims
Understanding of the applications of microcontroller based systems
Developing skills required to design, write and test software and
interface such systems.

Learning Outcomes
1. Analyse a system's requirements specification and select
appropriate computer systems and interfaces for subsequent
implementation.
2. Demonstrate a structured, modular, top-down approach to
software development in a hardware oriented environment.
3. Design, implement and test systems, written in a high level
programming language such as 'C' using appropriate
programmable interface devices from an initial specification
through to validation.

Learning Outcomes
1. Analyse a system's requirements specification and select
appropriate computer systems and interfaces for subsequent
implementation.
2. Demonstrate a structured, modular, top-down approach to
software development in a hardware oriented environment.
3. Design, implement and test systems, written in a high level
programming language such as 'C' using appropriate
programmable interface devices from an initial specification
through to validation.

Delivery & Assessment


Total Contact Hours :
15 Theory sessions 3Hrs x 15 = 45 Hrs.
5 practical sessions -- 3Hrs x 5 = 15 Hrs.

Assessment Criteria
2 Take home assignments
Practical reports
(detailed report should be submitted for each and every practical)

Text Book(s)
Primary Textbook
Title:
Quintessential PIC Microcontroller,
TheAuthor:Sid Katzen (University of Ulster, United Kingdom)
ISBN:
185233942X
Format:
Paperback
Release:
Pages:
Publisher:
Distributor(s):

Date:08/30/2005
567
Springer-Verlag New York Inc
Springer-Verlag New York Inc

Text Book(s)
Secondary Textbook
Title:
Designing Embedded Systems with PIC Microcontrollers: Principles
and Applications
Author:
ISBN:
Format:

Tim Wilmshurst (University of Derby, UK)


0750667559
Paperback

Release:
Pages:
Publisher:

November 27, 2006


584
Newnes

What is an embedded
system?
An embedded system is a special-purpose computer system designed to
perform one or a few dedicated functions, often with real-time computing
constraints.

Embedded System
A system whose principal function is not computational, but which is
controlled by a computer embedded within it.

Refrigerator example

Refrigerator example Cont


It needs to maintain a moderately stable, low
temperature within it.
It does this by sensing its internal temperature and
comparing that with the temperature required.
It lowers the temperature by switching on a compressor.

Microprocessor vs
Microcontroller
Microprocessor requires additional circuitry to
function which are connected via the buses. (Ex: A
soundcard connected to the PCI slot must be used to
output sound)

Microcontroller - Basic circuitry is built to the unit it self


hence it can function on its own. (Ex: To output sound, a
microcontroller has a DAC is built in.)

Block diagram of a Computer

The Computer Subsystems Memory


The memory unit is necessary for the storage of program instructions
and data.

Memory appears as an array of cells, each holding a bit pattern which


defines the program.
0x45 a=1
0x67 a++
0x23 display a

Memory Cont
In order for the CPU to execute the program stored memory it should
fetch it.

Hence each memory cell should have a address.

The address of the cell is generated by a decoding network.


Address

Contains

0x01

0x45 a=1

0x02

0x67 a++

0x03

0x23 display a

The Computer Subsystems ALU


& CU
ALU: The Arithmetic and Logical Unit is where calculations and logical
operations are performed electronically.

CU: The Control Unit regulates and synchronizes operations of the


computer. It consists of Programmable Registers and other electronics.
The combination of the ALU + the Control Unit is often referred to as the
Central Processing Unit (CPU).

ALU

The Computer Subsystems


I/O & Clock generator
Input / Output Units: These units provide the interfaces to the outside
world. Information enters the computer via the input unit, and results of
the calculations are directed to the outside world via the output units.

Clock Generator: All operations within the computer are synchronized


to one master clock.

Bus Architecture
Electronic signals travel through wires, and there are
many connections between various components of the
computer, particularly between the CPU and the rest.
To minimize the number of connections, the wires ("data
paths") are shared among many devices and signals can
propagate between selected devices and then the
selection change.

Von Neumann Computer


Architecture

Von Neumann Computer


Architecture Cont
In essence, the von Neumann architecture comprises a Central Processing
Unit (CPU), a memory and a common connecting highway carrying data
back and forth.

Both the program and data share the memory of the system.

Internal Architecture
of a Von Neumann computer
DATA BUS

INPUT
DEVICE
I/O
PORTS

CONTROL
BUS

OUTPUT
DEVICE

CENTRAL
PROCESSING
UNIT (CPU)

ADDRESS BUS

Memory
CPU
I/O
Data / Control / Address buses

CONTROL
BUS

MEMORY
(RAM/ROM)

Buses Cont
A group of data paths (wires) shared between a number
of devices is known as a "Bus". In a computer, there are
three main groups
Address bus

Data bus
Control bus

Address Bus
Address Bus: This group of wires carries the address
information. It is unidirectional going from CPU to Memory
or I/O. For Microcontrollers this is typically 16 bits wide,
giving an address range of 65,536 locations.

If the CPU has N address lines, it could address 2N memory


locations.

Data Bus
This group of wires carries the data information and is bi
directional.

But only one device at a time has its outputs enabled.


Any device connected to the data bus must have three
state outputs.

This allows the device to disable the outputs when not


putting data on the bus.

Control bus
This group of wires carries the control and status
information. It can be unidirectional or bidirectional. The
width of the bus varies with different computers.

Typical control bus signals are, Memory Read, Memory


Write,
I/O Read, and I/O Write.

Memory read
To read a byte of data from a memory location, the CPU sends out
the memory address of the desired byte on the address bus.
Next sends out a memory read signal, on the control bus.

Then the data byte form memory travels along the data bus to the
CPU

Harvard Computer
Architecture

Harvard Computer
Architecture Cont
The Harvard architecture is an adaptation of the standard von
Neumann structure, that separates the shared memory into
entirely separate Program and Data stores.
The diagram shows two physically distinct buses used to carry
information to the CPU from these disjoint memories.
Each memory has its own Address bus and thus there is no
interaction between a Program cell and a Data cells address. The
two memories are said to lie in separate memory spaces.

Microcontroller families

Microcontroller families Cont


A manufacturer builds a microcontroller family around a fixed
microprocessor core. Different family members are created by using the
same core, combining with it different combinations of peripherals and
different memory sizes.

Each core is added different combinations of peripheral and memory


size, to make a number of family members. Because the core is fixed for
all members of one family, the instruction set is fixed and users have little
difficulty in moving from one family member to another.

Microcontroller families from


different manufacturers
Manufacturer

Microcontroller family

Atmel

AT91SAM7, AT91SAM9,

Intel

8048 family , 8051 family, 8096 family

Motorola

68HC05, 68HC08, 68HC11,68HC12

Microchip (PIC)

12FXXX, 16FXXX,18FXXX

Nokia N97 ARM11


Features:
Resolution: 360x640
OS: Symbian OS v9.4
Color depth: 24bit
ROM: 256MB
RAM: 128MB

Data bearer: HSDPA

Sony Ericsson P990 - Nexperia


PNX4008
Features:
Resolution: QVGA (240x320)
OS: Symbian OS
Color depth: 262k
Internal memory: 80MB
Data bearer: UMTS

LG KC1 - Marvell PXA320


Features:
Supports Wireless Broadband

2.8 Touch Screen


QVGA (240*320) with 65k colors
128 MB Ram
512 Rom
OS: Windows Mobile 5.0 PPC PE

Microcontrollers used in
Mobiles
Mobile

Microcontroller

Nokia N97

ARM11

Sony Ericsson P990

Nexperia PNX4008

LG KC1

Marvell PXA320

Processor features
Microcontroller

Bits

Speed

Instruction set

Features

ARM11

64-bit

532-665
MHz

RISC

Power Management
4 cores
Enhanced for video
processing

Nexperia
PNX4008

32-bit

208 MHz

RISC

2D/3D Graphics
Accelerator
Integrated DSP

Marvell PXA320

32-bit

Up to
820MHz

RISC

Power Management
Supported
Hardware video
acceleration.

Design challenges and considerations


in Embedded Systems
Limited memory
Limited processing power
Reduced power consumption by disabling unwanted peripherals
and activating peripherals when required
Low cost
Less weight / Smaller Size
Security
Reliability

Você também pode gostar