Front cover image for The 8051 microcontroller and embedded systems : using Assembly and C

The 8051 microcontroller and embedded systems : using Assembly and C

Contents include: Preface; Introduction; The Classical Period: Nineteenth Century Sociology; Auguste Comte (1798-1857) on Women in Positivist Society; Harriett Martineau (1802-1876) on American WomenBebel, August (1840-1913) on Women and Socialism; Emile Durkheim (1858-1917) on the Division of Labor and Interests in Marriage; and more.
Print Book, English, 2006
2nd ed., International ed View all formats and editions
Pearson/Prentice Hall, Upper Saddle River, N.J., 2006
xiii, 626 pages : illustrations ; 27 cm
9780131970892, 0131970895
1006311293
CHAPTER 0: INTRODUCTION TO COMPUTING 1Section 0.1: Numbering and coding systems 2Section 0.2: Digital primer 9Section 0.3: Inside the computer 13CHAPTER 1: THE 8051 MICROCONTROLLERS 23Section 1.1: Microcontrollers and embedded processors 24Section 1.2: Overview of the 8051 family 28CHAPTER 2: 8051 ASSEMBLY LANGUAGE PROGRAMMING 37Section 2.1: Inside the 8051 38Section 2.2: Introduction to 8051 Assembly programming 41Section 2.3: Assembling and running an 8051 program 44Section 2.4: The program counter and ROM space in the 8051 46Section 2.5: 8051 data types and directives 49Section 2.6: 8051 flag bits and the PSW register 52Section 2.7: 8051 register banks and stack 55CHAPTER 3: JUMP, LOOP, AND CALL INSTRUCTIONS 69Section 3.1: Loop and jump instructions 70Section 3.2: Call instructions 75Section 3.3: Time delay for various 8051 chips 80CHAPTER 4: I/OPORTPROGRAMMING 93Section 4.1: 8051 I/O programming 94Section 4.2: I/O bit manipulation programming 100CHAPTER 5: 8051 ADDRESSING MODES 109Section 5.1: Immediate and register addressing modes 110Section 5.2: Accessing memory using various addressing modes 112Section 5.3: Bit addresses for I/O and RAM 122Section 5.4: Extra 128-byte on-chip RAM in 8052 131CHAPTER 6: ARITHMETIC & LOGIC INSTRUCTIONSAND PROGRAMS 139Section 6.1: Arithmetic instructions 140Section 6.2: Signed number concepts and arithmetic operations 150Section 6.3: Logic and compare instructions 155Section 6.4: Rotate instruction and data serialization 161Section 6.5: BCD, ASCII, and other application programs 167CHAPTER 7: 8051 PROGRAMMING IN C 181Section 7.1: Data types and time delay in 8051 C 182Section 7.2: I/O programming in 8051 C 188Section 7.3: Logic operations in 8051 C 194Section 7.4: Data conversion programs in 8051 C 199Section 7.5: Accessing code ROM space in 8051 C 204Section 7.6: Data serialization using 8051 C 209CHAPTER 8: 8051 HARDWARE CONNECTION ANDINTEL HEX FILE 217Section 8.1: Pin description of the 8051 218Section 8.2: Design and test of DS89C4x0 trainer 224Section 8.3: Explaining the Intel hex file 232CHAPTER 9: 8051 TIMER PROGRAMMINGIN ASSEMBLY AND C 239Section 9.1: Programming 8051 timers 240Section 9.2: Counter programming 255Section 9.3: Programming timers 0 and 1 in 8051 C 260CHAPTER 10: 8051 SERIAL PORT PROGRAMMINGIN ASSEMBLY AND C 277Section 10.1: Basics of serial communication 278Section 10.2: 8051 connection to RS232 285Section 10.3: 8051 serial port programming in Assembly 287Section 10.4: Programming the second serial port 300Section 10.5: Serial port programming in C 306CHAPTER 11: INTERRUPTS PROGRAMMINGIN ASSEMBLY AND C 317Section 11.1: 8051 interrupts 318Section 11.2: Programming timer interrupts 322Section 11.3: Programming external hardware interrupts 326Section 11.4: Programming the serial communication interrupt 333Section 11.5: Interrupt priority in the 8051/52 337Section 11.6: Interrupt programming in C 340CHAPTER 12: LCD AND KEYBOARD INTERFACING 351Section 12.1: LCD interfacing 352Section 12.2: Keyboard interfacing 363CHAPTER 13: ADC, DAC, AND SENSOR INTERFACING 373Section 13.1: Parallel and serial ADC 374Section 13.2: DAC interfacing 398Section 13.3: Sensor interfacing and signal conditioning 403CHAPTER 14: 8051 INTERFACING TO EXTERNAL MEMORY 411Section 14.1: Semiconductor memory 412Section 14.2: Memory address decoding 422Section 14.3: 8031/51 interfacing with external ROM 425Section 14.4: 8051 data memory space 430Section 14.5: Accessing external data memory in 8051 C 440CHAPTER 15: 8051 INTERFACING WITH THE 8255 449Section 15.1: Programming the 8255 450Section 15.2: 8255 interfacing 458Section 15.3: 8051 C programming for the 8255 462CHAPTER 16: DS12887 RTC INTERFACINGAND PROGRAMMING 467Section 16.1: DS12887 RTC interfacing 468Section 16.2: DS12887 RTC programming in C 476Section 16.3: Alarm, SQW, and IRQ features of theDS12887 chip 479CHAPTER 17: MOTOR CONTROL: RELAY, PWM, DC,AND STEPPER MOTORS 491Section 17.1: Relays and optoisolators 492Section 17.2: Stepper motor interfacing 498Section 17.3: DC motor interfacing and PWM 507APPENDIX A: 8051 INSTRUCTIONS, TIMING, AND REGISTERS 523APPENDIX B: BASICS OF WIRE WRAPPING 563APPENDIX C: IC TECHNOLOGY AND SYSTEM DESIGN ISSUES 567APPENDIX D: FLOWCHARTS AND PSEUDOCODE 587APPENDIX E: 8051 PRIMER FOR X86 PROGRAMMERS 592APPENDIX F: ASCII CODES 593APPENDIX G: ASSEMBLERS, DEVELOPMENT RESOURCES,AND SUPPLIERS 594APPENDIX H: DATA SHEETS 596INDEX 617
Includes index