<<

Chapter 2

Overview of Architecture and -Resources

2011 -... 2nd Ed. Raj Kamal Pearson Education 1 Lesson 1

Additional resources to a in Microcontroller Architecture

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education 2

Port P2 Port P3 SFRs

Port P1 Port Timer

Data Memory 64B CPU RAM Program

Port P0 Port Memory 1 kB Microprocessor ROM, resources EPROM or FLASH 8048 MCU (CPU + Internal Resources)

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education 3 Pointer 16-bit Registers

• 16-bit Program PC to point to program memory • 16-bit Data Pointer DPTR points to external data memory. • DPTR—two bytes DPH-DPL (two SFRs)

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education 4 8048 Execution Unit

IR ID Temp 1 Temp 2 Control and ALU Sequencer Circuits Osc- circuit Flags Reset A SFRs, Internal RAM circuit SFRs and ROM, RAM, 2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education 5 • Instructions have operands of 8 - bit data type

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education 6 Internal

Fetch IR Decode ID Control Execution and Sequencer Circuits Control memory Micro codes based -Implementation

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education 7 Buses and XTAL • 16-bit and 8-bit internal buses separate for program memory and data memory • 16 bit address and 8 bits external data buses to program and data memory • XTAL- Osc circuit

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education 8 8051 Family Boolean Processing Unit • An additional Boolean for the operations on single bits • Bit transfer, Bit XOR,OR, AND, Complement Operations

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education 9 8048 Architecture view

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education 10 • bus • Bus interface for 16-bit/8-bit address, data and instructions. • 1 Interrupt requests INT at P3.2 • PC initialization 0000H Reset

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education 11

Port P2 Port P3

Port P1 Port Timer

Internal Internal Program Data Port P0 Port Memory Memory ROM, EPROM 8048 on-chip RAM Resources Microcontroller-resources

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education 12 AD0-AD8 A8-A15

T0 P0 P2

Port P1 Port Port P3 Port IO and internal IR Execution devices SFRs ID unit A,PSW, SP Reset DPTR Osc Condition test branch Register Bank of Interrupt logic 8 registers, Stack Control Internal 8 B and internal ROM 1 kB RAM 48B

Control and Sequencing Circuit PC

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education 13 Supply circuit Standby power

VDD VSS < 1cm 8048

VCC

Cd decoupling capacitor

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education 14 VDD < 1cm VCC An IC for 8048 RST reset or a Push button for VSS manual reset Cd decoupling capacitor Reset circuit 2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education 15 Internal and External Buses

MDR AD0 – AD7 MAR A8-A15 SFRs Internal Buses Ports P0 RAMProgram Interface and P2 memory Unit option - PC ALE program memory PSEN or data Internal Bus 8- RD bit Internal Bus memory Address WR Bus2011 16-bit Microcontrollers8-bit -... 2nd Ed. Raj Kamal Pearson Education 16 Internal Device • Timers T0 - Event Counter

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education 17 8048 Pins

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education 18 VCC Standby P1.0 to P1.7 VDD AD0 – AD7 RST P0.0 to P0.7 EA P3.7 to P3.0 ALE

PSEN

XTAL2 8048 options SS XTAL1 P2.7 to P2.0 VSS A8-A15

WR, RD, T0, INT/ P3 options

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education 19 Oscillator Circuit,

XTAL XTAL1 8051 C-Osc

XTAL2

C-Osc

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education 20 EA, ALE, PSEN, SS

• SS means single step mode • EA is made 0 by user to enable use of external program memory space in place of the internal program memory space •Control signal ALE = 1 to enable latching of address A0-A7 bits from AD0-AD7 •Control signal PSEN = 0 to enable read of program memory bits from external program memory 2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education 21 Outline

• 8048 MCU Feature and Resources • Execution Unit- ALU • MCU Architecture overview • 8051 Series Family Members • 68HC11 Series Family Members

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education 22 8051 Series Family Members 64 kB 64 kB Data Program RAM Memory 8051 8051 Philips Classic Extended 8051 MX

4 kB ROM, 128 B RAM Internal 8051 Series

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education 23 8051 Series Family Members 4 kB ROM, Extended 16 Extended 256 B RAM MB Data RAM 16 MB Internal Program 8051 8051 MemoryPhilips Classic Extended 8051 MX

8051 Series

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education 24 8051 Series Family Members External/ 8 MB ROM Unified 64 MB + 8MB Program/Data Internal Constants Memory unified ROM 8051 8051 Philips Classic Extended 8051 MX

16-bit Stack Pointer, 768 B 8051 Series Internal

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson EducationRAM 25 68HC11/12/16 Series Family Members Internal/External Unified 64 kB Data RAM/ Program memory/EEPROM 8-bit MCU 68HC11 68HC12 68HC16

4 Ports 68HC11/12/16 Series

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education 26 68HC11/12/16 Series Family Members Internal/External 8CH. Timers Unified 4 MB Data 16-bit RAM/ Program PACNT 16-bit MCU memory/ EEPROM 12 Ports 68HC11 68HC12 68HC16

68HC11/12/16 Series 2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education 27 68HC11/12/16 Series Family Members Enhanced 68HC12 Advanced Timers, ADCs 16-bit 16-bit MCU PACNT 16 Ports

68HC11 68HC12 68HC16

68HC11/12/16 Series

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education 28 Summary

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education 29 We learnt • Microcontrollers— A CPU with on-chip Ports, Memory, Special Function Registers, timers and other registers

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education 30 We learnt • 8048/51 family 8-bit processor, Harvard architecture • 8051 has Boolean processing unit also • 68HC11/12/16 Series, Princeton Architecture

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education 31