Donal Heffernan University of Limerick May-2002
8051 Tutorial D.Heffernan © 2000, 2001
1
Blank
8051 Tutorial D.Heffernan © 2000, 2001
2
Some reference material:
Test books + MacKenzie Scott. The 8051 Microcontroller, Prentice Hall. 3rd. Ed., 1999 + Yeralan and Ahluwalia. Programming and Interfacing the 8051 Microcontroller. Addison-Wesley. 1995.
U.L. Server (Shared folder) Go to ‘Network Neighborhood’, then ‘Entire Network’, then pick Domain ‘Intel_Data_Comm’ and choose the server ‘Intel_Comm’. In the folder ‘ET4514’ you will find the required information
Web Sites 8052 tutorial information by Vault Information Services: http://www.8052.com Intel’s site for 8051 based products: http://developer.intel.com/design/mcs51/ Philips’ site for 8051 based products: http://www-us.semiconductors.philips.com/microcontrol/ Infineon (formerly Siemens) site for 8051 based products: http://www.infineon.com/products/micro/micro.htm Keil development tools: http://www.keil.com/home.htm Information on Analog Devices ADuC812 (8051/8052 compatible processor): www.analog.com/microconverter .
8051 Tutorial D.Heffernan © 2000, 2001
3
CONTENTS
Chapter 1 Chapter 2 Chapter 3 Chapter 4 Chapter 5 Chapter 6 Appendix A Appendix B Appendix C 8051 Microcomputer Overview A Simple Design Example Software Delay Routines Interrupts Timer/Counters The 8051 Serial Port Example Term Assignments Sample Exam Questions & Answers A Brief Introduction to Using Keil Tools 6 31 36 45 53 65 A1 B1 C1
8051 Tutorial D.Heffernan © 2000, 2001
4
8051 Tutorial D.Heffernan © 2000, 2001
5
Chapter 1
8051 Microcomputer Overview
1.1 INTRODUCTION Figure 1.1 shows a functional block of the internal operation of an 8051 microcomputer. The internal components of the chip are shown within the broken line box.
ADDRESS BUS (External) 16 bit
Internal Memory
Memory Address Register (Uses P0 and P2)
I-RAM General Registers STACK