The 8051 Microcontroller and Embedded Systems, Volume 1For courses teaching the 8051 Microcontoller. This book uses a step-by-step approach to teach the fundamentals of assembly language programming and interfacing of the 8051 microcontroller. It uses many examples to clarify concepts. Simple, concise examples are utilized to show what action each instruction performs, then a sample is provided to show its application. This text provides a comprehensive understanding of the internal organization of the 8051 registers and resources in a way that sheds the student's fear of assembly language. Whether students become designers of stand-alone systems or complex embedded systems, they will find this text a useful resource. |
From inside the book
Results 1-3 of 17
Page 73
... LCALL in the following . Solution : 001 0000 ORG 0 002 0000 7455 BACK : MOV 003 0002 F590 MOV 004 0004 120300 LCALL A , # 55H P1 , A DELAY 005 0007 74AA MOV 006 0009 F590 007 000B 120300 008 000E 80FO MOV LCALL DELAY load A with 55H ...
... LCALL in the following . Solution : 001 0000 ORG 0 002 0000 7455 BACK : MOV 003 0002 F590 MOV 004 0004 120300 LCALL A , # 55H P1 , A DELAY 005 0007 74AA MOV 006 0009 F590 007 000B 120300 008 000E 80FO MOV LCALL DELAY load A with 55H ...
Page 75
... LCALL SUBR 1 LCALL SUBR 2 LCALL SUBR 3 SJMP HERE -end of MAIN ; SUBR 2 : RET -end of subroutine 1 ; SUBR 3 : RET -end of subroutine 2 RET -end of subroutine 3 END ; end of the asm file Figure 3-1 . 8051 Assembly Main Program That Calls ...
... LCALL SUBR 1 LCALL SUBR 2 LCALL SUBR 3 SJMP HERE -end of MAIN ; SUBR 2 : RET -end of subroutine 1 ; SUBR 3 : RET -end of subroutine 2 RET -end of subroutine 3 END ; end of the asm file Figure 3-1 . 8051 Assembly Main Program That Calls ...
Page 145
... LCALL DELAY CLR P1.0 LCALL DELAY SJMP HERE ; set to high bit 0 of port 1 ; call the delay subroutine ; P1.0 = 0 ; keep doing it Another way to write the above program is : HERE : CPL P1.0 LCALL DELAY SJMP HERE ; complement bit 0 of ...
... LCALL DELAY CLR P1.0 LCALL DELAY SJMP HERE ; set to high bit 0 of port 1 ; call the delay subroutine ; P1.0 = 0 ; keep doing it Another way to write the above program is : HERE : CPL P1.0 LCALL DELAY SJMP HERE ; complement bit 0 of ...
Contents
CHAPTERS | 1 |
The 8051 Microcontrollers | 23 |
THE 8051 MICROCONTROLLERS 2323 Section 1 1 Microcontrollers and Embedded Processors | 24 |
Copyright | |
19 other sections not shown
Other editions - View all
The 8051 Microcontroller And Embedded Systems Using Assembly And C, 2/E Muhammad Ali Mazidi,Mazidi No preview available - 2007 |
Common terms and phrases
ACALL ACALL DELAY addr addressing mode ASCII Assembly language baud rate binary bit addresses carry flag Chapter CJNE connected convert data pins decimal decoder discussed DJNZ DPTR EPROM Example execution external interrupt Figure flag bit frequency I/O ports instruction INT1 Intel interfacing interrupt vector table jump latch LCALL LJMP load logic loop machine cycle memory chip memory location microcontroller microprocessor MOV P1 MOV RO MOVX Notice NV-RAM on-chip ROM opcode operand output pointer program counter PSEN pull-up resistors pulse RAM location register bank reset Review Questions SBUF SECTION serial communication SETB TR1 Show signal SJMP Solution square wave stack stepper motor stop bit SUBB subroutine target address TCON timer Timer/counter TMOD transistors True or false voltage Write a program