Vous êtes sur la page 1sur 41

Chapter 3

Device and Serial and Parallel


communication Buses for
Devices Network -I
By Suhas B Shirol

Formalization of System Design


using Top Down approach
Requirements and Specifications of
hardware and software
Define architectures of hardware and
software
Coding and implementation as per
architecture
Testing, validation and verification of
system

Diagrammatic model - UML


(Universal Modeling Language)
Conceptual design modeling
Classes and Objects to describe
identity,
attributes, components and behaviour
Inheritances in classes and objects
Interfaces with the objects and their
implementation in the objects,
Structural description of the design
components

Behavioral description in terms of


states, state machine and signals
Events description

Case Study:AUTOMATIC
CHOCOLATE VENDING
MACHINE (AVCM)

ACVM Specifications
Alphanumeric keypad on the top of
the machine.
A child interaction with it when
buying a chocolate.
Owner commands and interaction
with the machine.

Cont.
Three line LCD display unit on the
top of the machine.
Displays menus, entered text,
pictograms, and welcome, thank and
other messages, and time and date.
Child as well as the ACVM owner
GUIs with the machine using keypad
and display.

Coin insertion and delivery


slots, and
Internet port

Coin insertion slot so that the child


can insert the coins to buy a chocolate
Delivery slot to collect the chocolate,
and coins if refunded
Internet connection port so that owner
can interact with ACVM from remote

Basic system in ACVM

Reprogram of the codes and


relocation
of the codes

The system ROM or flash or EPROM


whenever the following happens:
(i) the price of chocolate increases,
(ii) the message lines or menus or
advertisement graphics needs to be
changed or
(iii) machine features change.

Block diagram of ACVM


hardware
including Microcontroller

Software architecture (ISRs and


Tasks) for ACVM

Case Study: Digital


Camera

Specifications
Camera records the pictures using a charge
coupled devices (CCD) array.
The array consisting of large number of
horizontal rows and vertical columns of
CCD cells for the picture
In each row of cells, a number of CCD cell
unexposed to the picture but used for offset
corrections in the each-row output from the
picture cells.

Camera Picture
resolution
2592 1944 pixels, there are 2592
1944 = 5038848 set of cells.
Each set of pixel has three cells, for the
red, green and blue components in a pixel.
Each cell gets exposed to a picture
when shutter of camera opens on a user
command.

Controllers, LCD display,


Switches and
buttons

A set of controllers to control shutter, flash,


auto focus and eye-ball image control.
LCD display for graphics and GUI
Switches and buttons for inputs at camera.
User gives commands for switching on the
camera, flash, shutter, adjust brightness,
contrast, color, save and transfer.
When a button for opening the shutter is
pressed, a flash lamp glows and a self-timer
circuit switches off the lamp automatically

Picture transfer Ports


JPEG file for a picture can be copied or
transferred to a memory stick using a
controller
Sony memory stick Micro (M2) size
1512.51.2 mm, flash memory of 2 GB
and 160 Mbps data transfer rate.
A picture jpg can be copied to a
computer
connected through USB port controller.

Digital camera hardware


architecture

Software architecture upper


layers

Software architecture lower


layers

Classification and
Development
Skills Requirements for the
Embedded Systems

Classification of ES
Small Scale Embedded Systems

Medium Scale Embedded Systems

Sophisticated Embedded Systems

Skills for ES
Skills for Small Scale System
Full understanding of a microcontroller
with a basic knowledge of computer
architecture, digital electronic design,
software engineering, data
communication, control engineering,
motors and actuators, sensors and
measurements, analog electronic
design and IC design and manufacture

Cont..

Median Scale Embedded Systems

'C'/C++/Java programming and RTOS programming and program


modeling skills

Programming the Tasks or threads and their scheduling by RTOS.

Programming priorities and Cooperative and preemptive scheduling.


Use of Inter processor communication functions.
Use of shared data, and programming the critical sections and reentrant
functions.

Use of semaphores, mailboxes, queues, sockets and pipes.

Handling of interrupt-latencies and meeting task deadlines.

Use of various RTOS functions.

Use of physical and virtual device drivers.

Cont
Sophisticated Scale Embedded Systems

Team is needed to co-design and solve the high


level complexities of the hardware and software
design.

An embedded system hardware engineer should


have full skills in hardware units and basic knowledge
of 'C'/C++ and Java, RTOS and other programming
tools.

Software engineer should have basic


knowledge
in hardware and a through knowledge of 'C', RTOS
and other programming tools. A final optimum design
solution is then obtained by system integration.

IO port types- Serial and


parallel IO ports

Port
A port is a device:

To receive the bytes from external


peripheral(s) [or device(s) or processor(s) or
controllers] for reading them later using
instructions executed on the processor or

To send the bytes to external peripheral


or
device or processor using instructions
executed on processor

I/O Example
SI serial interface in 8051
SPI serial peripheral interface in
68HC11
PPI parallel peripheral interface 8255
Ports P0, P1, P2 and P3 in 8051 or
PA, PB,
PC and PD in 68HC11
COM1 and COM2 ports in an IBM PC

IO Port Types
Types of Serial ports:
Synchronous Serial Input
Synchronous Serial Output
Asynchronous Serial UART input
Asynchronous Serial UART output
Both as input and as output, for
example,
modem.

Cont
Types of parallel ports:

Parallel port one bit Input


Parallel one bit output
Parallel Port multi-bit Input
Parallel Port multi-bit Output

Synchronous Serial Input


Example

Synchronous Serial Output


Example

Synchronous Serial
Input/output

Asynchronous Serial input RxD


at UART
COM Port

Format of bits at UART


protocol

Asynchronous Serial
Output
Asynchronous output serial port line TxD
(transmit data).
Each bit in each byte transmit at fixed
intervals but each output byte is not in
synchronization (separates by a variable
interval or phase difference). Minimum
separation is 1 stop bit interval

Parallel Port single bit input


Completion of a revolution of a wheel
Achieving preset pressure in a boiler
Exceeding the upper limit of permitted
weight over the pan of an electronic
balance,
Presence of a magnetic piece in the
vicinity of or within reach of a robot
arm to its end point and Filling of a
liquid up to a fixed level.

Parallel Port Output- single


bit

PWM output for a DAC, which controls


liquid level, or temperature, or pressure, or
speed or angular position of a rotating
shaft
or a linear displacement of an object or a
d.c. motor control
Pulses to an external circuit
Control signal to an external circuit

Parallel Port Input- multi-bit


ADC input from liquid level measuring
sensor or temperature sensor or pressure
sensor or speed sensor or d.c. motor rpm
sensor
Encoder inputs for bits for angular position
of a rotating shaft or a linear displacement
of an object

Parallel Port Output- multibit


LCD controller for Multilane LCD display
matrix unit in a cellular phone to display on
the screen the phone number, time,
messages, character outputs or pictogram
bit-images for display screen or e-mail or
web page

Print controller output


Stepper-motor coil driving bits

Thank U

Vous aimerez peut-être aussi