37
Chapter 14 Motorola MC68HC11 Family Motorola MC68HC11 Family MCU Architecture MCU Architecture

MicroCCh14L1

Embed Size (px)

Citation preview

Page 1: MicroCCh14L1

8/6/2019 MicroCCh14L1

http://slidepdf.com/reader/full/microcch14l1 1/37

Chapter 14

Motorola MC68HC11 FamilyMotorola MC68HC11 Family

MCU ArchitectureMCU Architecture

Page 2: MicroCCh14L1

8/6/2019 MicroCCh14L1

http://slidepdf.com/reader/full/microcch14l1 2/37

Ch14L1-"Microcontrollers....", RajKamal, from Pearson Education,

2

Lesson 1

68HC11 MCU Architecture

overview

Page 3: MicroCCh14L1

8/6/2019 MicroCCh14L1

http://slidepdf.com/reader/full/microcch14l1 3/37

Ch14L1-"Microcontrollers....", RajKamal, from Pearson Education,

3

Outline

•• CPU Registers,CPU Registers,• MCU Architecture overview

• Address and Data Buses• Execution Unit- ALU• Ports

Page 4: MicroCCh14L1

8/6/2019 MicroCCh14L1

http://slidepdf.com/reader/full/microcch14l1 4/37

Ch14L1-"Microcontrollers....", RajKamal, from Pearson Education,

4

CPU Registers

• ACCA and ACCB• 16-bit Program Counter PC• 16-bit Stack Pointer S• 16-bit Index Registers IX and IY• 8- bit CCR (Condition Code

Register)

Page 5: MicroCCh14L1

8/6/2019 MicroCCh14L1

http://slidepdf.com/reader/full/microcch14l1 5/37

Ch14L1-"Microcontrollers....", RajKamal, from Pearson Education,

5

Microcontroller68HC11

8-bit

16-bit IndexRegisters

IXandIY

16-bitProgramCounter

PC

ClockRedu-

cible to0

FullyMOS-FET

Based

ACCAand

ACCB

Stop Instruction

8 MHzXTAL

Accumulators 16-bitStack

PointerS

CCR

Decrease

afterpush,increasebefore

pop

Internal RAM andROM, RAM,Registers ,EEPROM

InternalBus

Page 6: MicroCCh14L1

8/6/2019 MicroCCh14L1

http://slidepdf.com/reader/full/microcch14l1 6/37

Ch14L1-"Microcontrollers....", RajKamal, from Pearson Education,

6

Outline

• CPU Registers,

•• MCU Architecture overviewMCU Architecture overview

• Address and Data Buses• Execution Unit- ALU• Ports

Page 7: MicroCCh14L1

8/6/2019 MicroCCh14L1

http://slidepdf.com/reader/full/microcch14l1 7/37

Ch14L1-"Microcontrollers....", RajKamal, from Pearson Education,

7

• Fully static operation- MCU clock can be reduced to 0 – being fullyMOSFETs based

Stop Instruction

Page 8: MicroCCh14L1

8/6/2019 MicroCCh14L1

http://slidepdf.com/reader/full/microcch14l1 8/37

Ch14L1-"Microcontrollers....", RajKamal, from Pearson Education,

8

Performance

As per 8MHz XTL 2MHz E-Clock

Page 9: MicroCCh14L1

8/6/2019 MicroCCh14L1

http://slidepdf.com/reader/full/microcch14l1 9/37

Ch14L1-"Microcontrollers....", RajKamal, from Pearson Education,

9

• 68HC11 common 8-bit internal bus forthe 16-bit addressing and 8-bit data

• Princeton architecture bus

• Bus interface for 8-bit data andinstructions.• Two interrupts – Maskable Interrupt

request (IRQ) and Initialization optionas unmaskable (XIRQ)

• PC initialization using reset vectorFFFEH-FFEFH Reset

Page 10: MicroCCh14L1

8/6/2019 MicroCCh14L1

http://slidepdf.com/reader/full/microcch14l1 10/37

Ch14L1-"Microcontrollers....", RajKamal, from Pearson Education,

10

68HC11 Architecture Overview

Page 11: MicroCCh14L1

8/6/2019 MicroCCh14L1

http://slidepdf.com/reader/full/microcch14l1 11/37

Ch14L1-"Microcontrollers....", RajKamal, from Pearson Education,

11

CPU registers

IO and internaldevices Registers

AMUX

Control and Sequencing Circuit

OPTION, COPRS, PPROG, HIPRO, INIT,CONFIG,TESTI

Port C

Internal RAMand ROM,RAM, EEPROM

A8-A15

Port B

P

o r t

D

P o

r t A

P o r t

E

ADC

S/H

AD0-AD8

TCNT

Out-

compareIn CaptureCOP RTC

InterruptControl

ID

IR

A C C A

, A C C B

, I X

, I Y

, P C

, S

, C C R

Reset

Osc

PACNT

S C

I S P I

DDRC

DDRD

ExecutioExecution unitn unit

Page 12: MicroCCh14L1

8/6/2019 MicroCCh14L1

http://slidepdf.com/reader/full/microcch14l1 12/37

Ch14L1-"Microcontrollers....", RajKamal, from Pearson Education,

12

Memory Architecture

68HC11/12

Address InternaldevicesRegistersData and

Program,constants,stored tablesCommonMemory

Internal RAM andROM, RAM, EEPROM

IO and internal devices,System control

Registers

64 kB of linear address space

Page 13: MicroCCh14L1

8/6/2019 MicroCCh14L1

http://slidepdf.com/reader/full/microcch14l1 13/37

Ch14L1-"Microcontrollers....", RajKamal, from Pearson Education,

13

68HC11 Family ProgrammingModel

CPU Registers

Internal RAM andROM, RAM, EEPROM

IO and internal

devices Registers

Address Space

System Function

Control Registers

OPTION,

COPRS,

IPRO,

INIT,

CONFIG,

TESTI

Page 14: MicroCCh14L1

8/6/2019 MicroCCh14L1

http://slidepdf.com/reader/full/microcch14l1 14/37

Ch14L1-"Microcontrollers....", RajKamal, from Pearson Education,

14

• Processor operation of 16-bit datatype is as per word alignment atmemory in big endian [leastsignificant byte stored as higher

bits (address 1) of a word]

•Instructions have 88 data type• Few use 16- bit data types

Page 15: MicroCCh14L1

8/6/2019 MicroCCh14L1

http://slidepdf.com/reader/full/microcch14l1 15/37

Ch14L1-"Microcontrollers....", RajKamal, from Pearson Education,

15

A 16bit word in memoryBig Endian

Address0

Address

Byte0 (LSB)

Byte1 (MSB)

Address1

16-bit word alignment

Page 16: MicroCCh14L1

8/6/2019 MicroCCh14L1

http://slidepdf.com/reader/full/microcch14l1 16/37

Ch14L1-"Microcontrollers....", RajKamal, from Pearson Education,

16

Outline

• CPU Registers,• MCU Architecture overview

•• Address and Data BusesAddress and Data Buses• Execution Unit- ALU• Ports

Page 17: MicroCCh14L1

8/6/2019 MicroCCh14L1

http://slidepdf.com/reader/full/microcch14l1 17/37

Ch14L1-"Microcontrollers....", RajKamal, from Pearson Education,

17

Internal and External BusesInternal and External Buses

ACCA orACCB

CCR

MDR

S

MAR

InternalDevices

IXIY

PC

AD0 – AD7

A8 - A15

Internal Bus 8-bit

Bus InterfaceBus InterfaceUnitUnit

Page 18: MicroCCh14L1

8/6/2019 MicroCCh14L1

http://slidepdf.com/reader/full/microcch14l1 18/37

Ch14L1-"Microcontrollers....", RajKamal, from Pearson Education,

18

Outline

• CPU Registers,• MCU Architecture overview

• Address and Data Buses•• Execution UnitExecution Unit -- ALUALU• Ports

Page 19: MicroCCh14L1

8/6/2019 MicroCCh14L1

http://slidepdf.com/reader/full/microcch14l1 19/37

Ch14L1-"Microcontrollers....", RajKamal, from Pearson Education,

19

• ACCA or ACCB used as 8-bit ACC oras16-bit ACCD (double accumulator)• 8-bit ALU includes multiplier and divide

Page 20: MicroCCh14L1

8/6/2019 MicroCCh14L1

http://slidepdf.com/reader/full/microcch14l1 20/37

Ch14L1-"Microcontrollers....", RajKamal, from Pearson Education,

20

Execution UnitExecution Unit

ACCA orACCB

CCR

Temp 1 Temp 2

ALUOR, AND,XOR

Rotate/ Shift

CMP,TST

+, - , xor ÷÷÷÷

IX

IY

IR

ID

Controland

Sequencer

Circuits

Internal RAM andROM, RAM,

Registers ,EEPROM

Page 21: MicroCCh14L1

8/6/2019 MicroCCh14L1

http://slidepdf.com/reader/full/microcch14l1 21/37

Ch14L1-"Microcontrollers....", RajKamal, from Pearson Education,

21

Instruction Execution

InstructionDecode

InstructionFetch

InstructionExecute

STAGE 1

STAGE 2

STAGE3 to n

Time

clock

cycle (s)

Page 22: MicroCCh14L1

8/6/2019 MicroCCh14L1

http://slidepdf.com/reader/full/microcch14l1 22/37

Ch14L1-"Microcontrollers....", RajKamal, from Pearson Education,

22

Control memory micro codes based -Implementation

Internal bus

Execution

IRID

Fetch

DecodeControl

andSequencer

Circuits

Page 23: MicroCCh14L1

8/6/2019 MicroCCh14L1

http://slidepdf.com/reader/full/microcch14l1 23/37

Ch14L1-"Microcontrollers....", RajKamal, from Pearson Education,

23

Outline

• CPU Registers,• MCU Architecture overview

• Address and Data Buses• Execution Unit- ALU

•• PortsPorts

Page 24: MicroCCh14L1

8/6/2019 MicroCCh14L1

http://slidepdf.com/reader/full/microcch14l1 24/37

Ch14L1-"Microcontrollers....", RajKamal, from Pearson Education,

24

Port PAPA7

PA6PA5PA4PA3

PA1PA0

PA2

IO

OOO

II

IO

Option 1Option 1

OC1

OC2OC3OC4

IC2IC3

IC1OC5

Option 2Option 2

Cnt

OOO

II

IO

Option 3Option 3

TCNT

Out-compare

In Capture

PACNT

AddressAddress–– xx’’000H000H

Page 25: MicroCCh14L1

8/6/2019 MicroCCh14L1

http://slidepdf.com/reader/full/microcch14l1 25/37

Ch14L1-"Microcontrollers....", RajKamal, from Pearson Education, 25

Port PB

PB7PB6PB5PB4

PB3

PB1PB0

PB2

OOOO

OO

OO

Option 1Option 1

A15A14A13A12

A9A8

A10A11

Option 2Option 2

AddressAddress–– xx’’004H004H

Page 26: MicroCCh14L1

8/6/2019 MicroCCh14L1

http://slidepdf.com/reader/full/microcch14l1 26/37

Ch14L1-"Microcontrollers....", RajKamal, from Pearson Education, 26

Port PC

PC7

PC6PC5PC4PC3

PC1PC0

PC2

DDRC7

DDRC6DDRC5DDRC4

DDRC1DDRC0

DDRC2

DDRC3

Option 1Option 1

A7

A6A5A4

A1A0

A2A3

Option 2Option 2

IO

IOIOIO

IOIO

IOIO

AddressAddress–– xx’’005H005H

AddressAddress–– xx’’007H007H

D7D6D5D4

D1D0

D2D3

Option 3Option 3

STRA Handshakesignals for PortSTRB

Page 27: MicroCCh14L1

8/6/2019 MicroCCh14L1

http://slidepdf.com/reader/full/microcch14l1 27/37

Ch14L1-"Microcontrollers....", RajKamal, from Pearson Education, 27

Port PD

PD2

MasterMaster

SSSCLK

TxDRxD

MISOMOSI

Option 2Option 2

IOIO

IOIO

IOIO

Option 1Option 1

SPI

SCI

PD5PD4

PD0

PD3

DDRD5DDRD4

DDRD1DDRD0

DDRD2DDRD3

AddressAddress–– xx’’008H008H

AddressAddress–– xx’’009H009H

PD1

SlaveSlave

SSSCLK

MOSIMISO

SPI

RxDTxD

ReceivingSCI

Option 3Option 3

Option 4Option 4

OOpptt

iioonn55

Page 28: MicroCCh14L1

8/6/2019 MicroCCh14L1

http://slidepdf.com/reader/full/microcch14l1 28/37

Ch14L1-"Microcontrollers....", RajKamal, from Pearson Education, 28

Port PEPE7

PE6PE5PE4PE3

PE1PE0

PE2

I

III

II

II

Option 1Option 1

AN7

AN6AN5AN4

AN1AN0

AN2AN3

AnalogAnalogInputInputOption 2Option 2

AddressAddress ––xx’’00AH00AH

AMUX

ADCS/H

ADCADCRegisterRegisterssADC TLADC TLRegisterRegister

Page 29: MicroCCh14L1

8/6/2019 MicroCCh14L1

http://slidepdf.com/reader/full/microcch14l1 29/37

• Expanded Mode used for interfacingExternal Memory and Ports

• Expanded Mode looses Port B and PortB• Recovered back by using 68HC24

Page 30: MicroCCh14L1

8/6/2019 MicroCCh14L1

http://slidepdf.com/reader/full/microcch14l1 30/37

Ch14L1-"Microcontrollers....", RajKamal, from Pearson Education, 30

Expansion ModeA15A14A13A12

A9A8

A10

A11

Port BPort BOption 2Option 2

AD7AD6AD5AD4AD3

AD0

AD2AD1

Port CPort COptionsOptions2/32/3

Latch

A0-A15

AS

E

AddressDecoder

D0-D7

CSCS

Expansion to Portsand Memory

AnAn --A15A15

Mode A=0Mode A=0

Mode B=1Mode B=1

Page 31: MicroCCh14L1

8/6/2019 MicroCCh14L1

http://slidepdf.com/reader/full/microcch14l1 31/37

Page 32: MicroCCh14L1

8/6/2019 MicroCCh14L1

http://slidepdf.com/reader/full/microcch14l1 32/37

Summary

Page 33: MicroCCh14L1

8/6/2019 MicroCCh14L1

http://slidepdf.com/reader/full/microcch14l1 33/37

• 68HC11 family 8-bit processor• PC, S, ACCA, ACCB, IX, IY, CCR

• Princeton architecture• 8 bit data type

• Big endian 16-bit word alignment• Two interrupts – Maskable Interrupt

request (IRQ) and Initialization option asunmaskable (XIRQ)

• PC initialization using reset vector

Page 34: MicroCCh14L1

8/6/2019 MicroCCh14L1

http://slidepdf.com/reader/full/microcch14l1 34/37

Internal and External MemoryAddresses-

• IO/Devices Control and StatusRegisters

• System Function Control Registers• Internal RAM• Internal ROM• EEPROM

Page 35: MicroCCh14L1

8/6/2019 MicroCCh14L1

http://slidepdf.com/reader/full/microcch14l1 35/37

Internal Devices

• TCNT with out compare, input capture,• SPI, SCI

• RTC• PACNT• Port E with option of analog inputs multi

channel AMUX, S/H, ADC• Port B /A8-A15,

• Port C with DDRC / AD0-AD7/ • Port A /IC1-IC3, OC1-OC5

• Port D with DDRD/SCI/SPI Master/Slave

Page 36: MicroCCh14L1

8/6/2019 MicroCCh14L1

http://slidepdf.com/reader/full/microcch14l1 36/37

End of Lesson 1 on MCU

Architecture overview

Page 37: MicroCCh14L1

8/6/2019 MicroCCh14L1

http://slidepdf.com/reader/full/microcch14l1 37/37

Ch14L1-"Microcontrollers....", RajKamal, from Pearson Education, 37

THANK YOU