tailieunhanh - Microcontroller 8051 - assembly language

Although the entire of 128 bytes of RAM can be accessed using direct addressing mode, it is most often used to access RAM loc. 30 – 7FH. MOV R0, 40H MOV 56H, A MOV A, 4 ; ≡ MOV A, R4 MOV 6, 2 ; copy R2 to R6 ; MOV R6,R2 is invalid ! | Microcontroller 8051 Assembly Language Mahdi Hassanpour Numerical Bases Used in Programming Hexadecimal Binary BCD Mahdi Hassanpour Hexadecimal Basis Hexadecimal Digits: 1 2 3 4 5 6 7 8 9 A B C D E F A=10 B=11 C=12 D=13 E=14 F=15 Mahdi Hassanpour Decimal, Binary, BCD, & Hexadecimal Numbers (43)10= (0100 0011)BCD= ( 0010 1011 )2 = ( 2 B )16 Mahdi Hassanpour Registers A B R0 R1 R3 R4 R2 R5 R7 R6 DPH DPL PC DPTR PC Some 8051 16-bit Register Some 8-bitt Registers of the 8051 SP Mahdi Hassanpour Memory mapping in 8051 ROM memory map in 8051 family 0000H 0FFFH 0000H 1FFFH 8751 AT89C51 8752 AT89C52 4k 8k Mahdi Hassanpour RAM memory space allocation in the 8051 7FH 30H 2FH 20H 1FH 17H 10H 0FH 07H 08H 18H 00H Register Bank 0 (Stack) Register Bank 1 Register Bank 2 Register Bank 3 Bit-Addressable RAM Scratch pad RAM Mahdi Hassanpour Addressing Modes Register Direct Register Indirect Immediate Relative Absolute Long Indexed Mahdi Hassanpour Register Addressing Mode MOV Rn, A ;n=0,,7 ADD A, Rn MOV DPL, R6 MOV DPTR, A MOV Rm, Rn Mahdi Hassanpour Direct Addressing Mode Although the entire of 128 bytes of RAM can be accessed using direct addressing mode, it is most often used to access RAM loc. 30 – 7FH. MOV R0, 40H MOV 56H, A MOV A, 4 ; ≡ MOV A, R4 MOV 6, 2 ; copy R2 to R6 ; MOV R6,R2 is invalid ! Mahdi Hassanpour Register Indirect Addressing Mode In this mode, register is used as a pointer to the data. MOV A,@Ri ; move content of RAM loc. where address is held by Ri into A ( i=0 or 1 ) MOV @R1,B In other word, the content of register R0 or R1 is sources or target in MOV, ADD and SUBB insructions. Mahdi Hassanpour Immediate Addressing Mode MOV A,#65H MOV R6,#65H MOV DPTR,#2343H MOV P1,#65H Mahdi Hassanpour Relative, Absolute, & Long Addressing Used only with jump and call instructions: SJMP ACALL,AJMP LCALL,LJMP Mahdi Hassanpour Indexed Addressing Mode This mode is widely used in accessing data elements of look-up table entries located in the program (code) space ROM at the | Microcontroller 8051 Assembly Language Mahdi Hassanpour Numerical Bases Used in Programming Hexadecimal Binary BCD Mahdi Hassanpour Hexadecimal Basis Hexadecimal Digits: 1 2 3 4 5 6 7 8 9 A B C D E F A=10 B=11 C=12 D=13 E=14 F=15 Mahdi Hassanpour Decimal, Binary, BCD, & Hexadecimal Numbers (43)10= (0100 0011)BCD= ( 0010 1011 )2 = ( 2 B )16 Mahdi Hassanpour Registers A B R0 R1 R3 R4 R2 R5 R7 R6 DPH DPL PC DPTR PC Some 8051 16-bit Register Some 8-bitt Registers of the 8051 SP Mahdi Hassanpour Memory mapping in 8051 ROM memory map in 8051 family 0000H 0FFFH 0000H 1FFFH 8751 AT89C51 8752 AT89C52 4k 8k Mahdi Hassanpour RAM memory space allocation in the 8051 7FH 30H 2FH 20H 1FH 17H 10H 0FH 07H 08H 18H 00H Register Bank 0 (Stack) Register Bank 1 Register Bank 2 Register Bank 3 Bit-Addressable RAM Scratch pad RAM Mahdi Hassanpour Addressing Modes Register Direct Register Indirect Immediate Relative Absolute Long Indexed Mahdi Hassanpour Register Addressing Mode MOV Rn, A ;n=0,,7 ADD A, .

crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.