16
CE 447 - Lecture 2 Internal Input/Output Devices (I/O Subsystems

ECE 447 - Lecture 2 Internal Input/Output Devices (I/O Subsystems)

Embed Size (px)

Citation preview

Page 1: ECE 447 - Lecture 2 Internal Input/Output Devices (I/O Subsystems)

ECE 447 - Lecture 2

Internal Input/OutputDevices (I/O Subsystems)

Page 2: ECE 447 - Lecture 2 Internal Input/Output Devices (I/O Subsystems)

CPU RAM

ROM

EEPROM

TIMER

A/DSPI

SCI

PORT A PORT B PORT C PORT D PORT E

Organization of MC68HC11 in the Single-Chip Mode

8 8 (4)8

24

6

8 (4)8

3 3 2

Page 3: ECE 447 - Lecture 2 Internal Input/Output Devices (I/O Subsystems)

Abbreviations

CPU - Central Processing Unit := ALU (Arithmetic Logic Unit) + Control

RAM - Random Access Memory := Read/Write Memory

ROM - Read Only Memory (non-volatile)

EPROM - Erasable Programmable ROM

EEPROM - Electrically Erasable ROM

SCI - Serial Communication Interface (asynchronous serial communication interface)

SPI - Serial Peripheral Interface (synchronous serial communication interface)

A/D - analog-to-digital converter

Page 4: ECE 447 - Lecture 2 Internal Input/Output Devices (I/O Subsystems)

Input/Output Ports

PortInput Pins

Output Pins

Bidirectional Pins

SharedFunctions

Port A

Port B

Port C

Port D

Port E

3

8

3

8

2

8

6

Timer

High Order Address

Low Order Address and Data Bus

SCI and SPI

A/D Converter

Page 5: ECE 447 - Lecture 2 Internal Input/Output Devices (I/O Subsystems)

Capabilities of the A/D converter

VRH 6 V

> 2.5 V

VRL 0 V

ADC

• successive approximation • minimum 4 conversions• single-channel or four-channel conversions• one-time or continuous conversions

10010010100100111001001110010100

Page 6: ECE 447 - Lecture 2 Internal Input/Output Devices (I/O Subsystems)

Capabilities of the 68HC11 timer (1)

label 1

label2

instr1instr2

instrN

1. Generating delays - imposing a specific delay between two points in the program

delay

2. Pulse accumulation - counting the number of pulses

Page 7: ECE 447 - Lecture 2 Internal Input/Output Devices (I/O Subsystems)

Capabilities of the 68HC11 timer (2)

3. Input capture - measuring the time between signal edges

4. Output compare - generating signals with the given timing characteristics

start stop

start stop

pulse width

single pulse periodical signal

period

Page 8: ECE 447 - Lecture 2 Internal Input/Output Devices (I/O Subsystems)

I/O Device Architecture

…..

Control registersinstructions

…..

Status registersstatus of the device

Data registers

…..

I/O device

address1/name1

addressN/nameN

. . . . .

inputs (operands)

outputs (results)

Page 9: ECE 447 - Lecture 2 Internal Input/Output Devices (I/O Subsystems)

Input/Output Register Types

1. Control registers - hold instructions that regulate the operation of internal I/O devices

2. Status registers - indicate the current status of internal I/O devices

3. Data registers - hold the input data sent to the I/O device and output data generated by this device

4. Data direction registers - control the direction (in or out) of the data flow to/from bidirectional data registers

Page 10: ECE 447 - Lecture 2 Internal Input/Output Devices (I/O Subsystems)

Memory mapped I/O

(e.g., Motorola)

0

MAX

I/O

Control lines: read/write

Separate I/O

(e.g., Intel)

0

MAX

I/O0

max

Control lines: read/write memory/io

Page 11: ECE 447 - Lecture 2 Internal Input/Output Devices (I/O Subsystems)

Memory map of MC68HC11E9

$0000

$1000

$B600

$D000

$FFFF

$0000-$01FF 512 bytes RAM

$1000-$103F 64 bytes I/O registers

$B600-$B7FF 512 bytes EEPROM

$D000-$FFFF12 kbytes ROM

Single-chip mode

Page 12: ECE 447 - Lecture 2 Internal Input/Output Devices (I/O Subsystems)

Memory map of MC68HC11E1

$0000

$1000

$B600

$FFFF

$0000-$01FF 512 bytes RAM

$1000-$103F 64 bytes I/O registers

$B600-$B7FF 512 bytes EEPROM

Single-chip mode

Page 13: ECE 447 - Lecture 2 Internal Input/Output Devices (I/O Subsystems)

CPU RAM

ROM

EEPROM

TIMERA/D

SPI

SCI

PORT A PORT D PORT E

Organization of MC68HC11 in the Expanded Bus Mode

8 (4)

24

6

8 (4)8

3 3 2

EXTERNAL RAM

EXTERNAL ROM

EXTERNAL EPROM

EXTERNAL I/O

Page 14: ECE 447 - Lecture 2 Internal Input/Output Devices (I/O Subsystems)

Memory map of MC68HC11E1

$0000

$1000

$B600

$FFFF

$0000

$1000

$B600

$FFFF

EXT

EXT

EXT

$0000-$01FF 512 bytes RAM

$1000-$103F 64 bytes I/O registers

$B600-$B7FF 512 bytes EEPROM

Single-chip mode Expanded bus mode

Page 15: ECE 447 - Lecture 2 Internal Input/Output Devices (I/O Subsystems)

Evaluation Board Configuration

68HC11E9

68HC24 - Port Replacement Unit

RAM (e.g. 5164)

ROM(e.g., 2764)

50 kB$2000-$B5FF

12 kB$D000-$FFFF

Program & data

Buffalomonitor

B

C

B

C

A

DE

RAM512B

EEPROM 512B

Page 16: ECE 447 - Lecture 2 Internal Input/Output Devices (I/O Subsystems)

Memory map of MC68HC11E9 with an external RAM

$0000

$1000

$B600

$FFFF

$0000-$01FF 512 bytes RAM

$1000-$103F 64 bytes I/O registers

$B600-$B7FF 512 bytes EEPROM

Expanded bus mode

$D000

$0000-$B5ff 32 kbytes RAM

$D000-$FFFF 12 kbytes ROM

$A5ff