The Embedded computing platform

Post on 12-Feb-2016

36 views 2 download

description

The Embedded computing platform. CPU bus. Memory. I/O devices. CPU bus. Connects CPU to: memory; devices. Protocol controls communication between entities. Bus protocol. Determines who gets to use the bus at any particular time. Governs length, style of communication. - PowerPoint PPT Presentation

transcript

© 2000 Morgan Kaufman

Overheads for Computers as Components

The Embedded computing platformCPU bus.Memory.I/O devices.

© 2000 Morgan Kaufman

Overheads for Computers as Components

CPU busConnects CPU to:

memory; devices.

Protocol controls communication between entities.

© 2000 Morgan Kaufman

Overheads for Computers as Components

Bus protocolDetermines who gets to use the bus

at any particular time.Governs length, style of

communication.

© 2000 Morgan Kaufman

Overheads for Computers as Components

Four-cycle handshakeBasis of many bus protocols.Uses two wires:

enq (enquiry); ack (acknowledgment).

dev1 dev2

enq

ack

data

© 2000 Morgan Kaufman

Overheads for Computers as Components

Four-cycle example

time

enq

ack

data

1

2

3

4

© 2000 Morgan Kaufman

Overheads for Computers as Components

Typical bus signalsClock.R/W’: true when bus is reading.Address: a-bit bundle.Data: n-bit bundle.Data ready’.

© 2000 Morgan Kaufman

Overheads for Computers as Components

Timing diagrams

time

A

B

C

zero

one

rising falling

stable

changing

10 ns

© 2000 Morgan Kaufman

Overheads for Computers as Components

Typical bus timing for readCPU:

set R/W’=1; asserts address, address enable.

Memory: asserts data; asserts data ready’.

CPU: deasserts address, address enable.

© 2000 Morgan Kaufman

Overheads for Computers as Components

Bus read state diagram

Getdata Done

Adrs

Wait

See ack

© 2000 Morgan Kaufman

Overheads for Computers as Components

Transaction typesWait state:

state in a bus transaction to wait for acknowledgment.

Disconnected transfer: bus is freed during wait state.

Burst: multiple transfers.

© 2000 Morgan Kaufman

Overheads for Computers as Components

Timers and countersVery similar:

a timer is incremented by a periodic signal;

a counter is incremented by an asynchronous, occasional signal.

Rollover causes interrupt.

© 2000 Morgan Kaufman

Overheads for Computers as Components

Watchdog timerWatchdog timer is periodically reset

by system timer.If watchdog is not reset, it generates

an interrupt to reset the host.

host CPU watchdogtimer

interrupt

reset

© 2000 Morgan Kaufman

Overheads for Computers as Components

Switch debouncingA switch must be debounced to

multiple contacts caused by eliminate mechanical bouncing:

© 2000 Morgan Kaufman

Overheads for Computers as Components

Encoded keyboardAn array of switches is read by an

encoder.N-key rollover remembers multiple

key depressions.row

© 2000 Morgan Kaufman

Overheads for Computers as Components

LEDMust use resistor to limit current:

© 2000 Morgan Kaufman

Overheads for Computers as Components

7-segment LCD displayMay use parallel or multiplexed

input.

© 2000 Morgan Kaufman

Overheads for Computers as Components

Types of high-resolution displayCathode ray tube (CRT)Liquid crystal display (LCD)Plasma, etc.

© 2000 Morgan Kaufman

Overheads for Computers as Components

TouchscreenIncludes input and output device.Input device is a two-dimensional

voltmeter:

© 2000 Morgan Kaufman

Overheads for Computers as Components

Touchscreen position sensing

ADC

voltage

© 2000 Morgan Kaufman

Overheads for Computers as Components

Digital-to-analog conversionUse resistor tree:

R

2R

4R

8R

bn

bn-1

bn-2

bn-3

Vout

© 2000 Morgan Kaufman

Overheads for Computers as Components

Flash A/D conversionN-bit result requires 2n comparators:

encoder

Vin

...

© 2000 Morgan Kaufman

Overheads for Computers as Components

Dual-slope conversionUse counter to time required to

charge/discharge capacitor.Charging, then discharging

eliminates non-linearities.

Vintimer

© 2000 Morgan Kaufman

Overheads for Computers as Components

Sample-and-holdRequired in any A/D:

converterVin