Download presentation
Presentation is loading. Please wait.
Published byDavid Ramsey Modified over 6 years ago
1
Memory organization On- chip memory Off-chip memory
Internal memory External Data memory (upto 64KB) RAM Internal SFRs External Code memory (upto 64KB) ROM Internal ROM Internal RAM 18-Nov-18 Micro 8051
2
On-Chip Memory Internal RAM
18-Nov-18 Micro 8051
3
8051 CPU Registers A (Accumulator) B PSW (Program Status Word)
SP (Stack Pointer) PC (Program Counter) DPTR (Data Pointer) Used in assembler instructions 18-Nov-18 Micro 8051
4
General Purpose Register
1F 18 Bank 3 4 Register Banks Each bank has R0-R7 Selectable by PSW.2,3 17 10 Bank 2 0F 08 Bank 1 07 06 05 04 03 02 01 00 R7 R6 R5 R4 R3 R2 R1 R0 Bank 0 18-Nov-18 Micro 8051
5
Bit Addressable Memory
2F 2E 2D 2C 2B 2A 29 28 20h – 2Fh (16 locations 8-bits = 128 bits) 7F 78 1A 10 0F 08 07 06 05 04 03 02 01 00 27 26 25 24 23 22 21 20 18-Nov-18 Micro 8051
6
Summary of on-chip data memory (RAM)
MOV C, 67H ≡ MOV C, 2CH.7 18-Nov-18 Micro 8051
7
Summary of on-chip data memory
18-Nov-18 Micro 8051
8
Special Function Registers
DATA registers CONTROL registers Timers Serial ports Interrupt system Etc. Addresses 80h – FFh Direct Addressing used to access SFRs 18-Nov-18 Micro 8051
9
Port 0 with external pull-up resistors
8751 8951 Vcc 10 K Port 0 18-Nov-18 Micro 8051
10
How the ports can be used as input?
Port 0 as input Port must be programmed by writing 1 to all the bits. E.g REPEAT: MOV A, #0FFH MOV P0, A MOV A, P0 MOV P1, A SJMP REPEAT Similarly for Port 1 when used as input. 18-Nov-18 Micro 8051
11
Continues… Port 3 Alternate functions: P3.0 RxD Serial Input line
P TxD Serial Output line P INT External interrupt 0 P INT External interrupt 1 P T Timer0 External input P T Timer1 External input P WR External data memory WR strobe P RD External data memory RD strobe 18-Nov-18 Micro 8051
12
Address Multiplexing for External Memory (code)
18-Nov-18 Micro 8051
13
18-Nov-18 Micro 8051
14
Stack Concepts
15
Continues…
16
Examples of Push operation
17
Examples of POP operation
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.