8051 Microcontroller and Embedded Systems / Edition 1

Hardcover (Print)
Used and New from Other Sellers
Used and New from Other Sellers
from $49.43
Usually ships in 1-2 business days
(Save 62%)
Other sellers (Hardcover)
  • All (11) from $49.43   
  • New (1) from $117.56   
  • Used (10) from $49.42   
Sort by
Page 1 of 1
Showing All
Note: Marketplace items are not eligible for any BN.com coupons and promotions
Seller since 2008

Feedback rating:



New — never opened or used in original packaging.

Like New — packaging may have been opened. A "Like New" item is suitable to give as a gift.

Very Good — may have minor signs of wear on packaging but item works perfectly and has no damage.

Good — item is in good condition but packaging may have signs of shelf wear/aging or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Acceptable — item is in working order but may show signs of wear such as scratches or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Used — An item that has been opened and may show signs of wear. All specific defects should be noted in the Comments section associated with each item.

Refurbished — A used item that has been renewed or updated and verified to be in proper working condition. Not necessarily completed by the original manufacturer.


Ships from: Chicago, IL

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
Page 1 of 1
Showing All
Sort by


This book uses a step-by-step approach to teach the fundamentals of assembly language programming and interfacing of the 8051 microcontroller. Simple, concise examples are utilized to show what action each instruction performs, then a sample is provided to show its application. For anyone interested in learning about the 8051 microcontroller.
Read More Show Less

Editorial Reviews

For engineering students and others interested in microprocessor applications where space, power, and rapid development are more critical than raw processing power, this textbook establishes a foundation for assembly language programming while comprehensively treating 8051 interfacing. Appends material on 8051 instructions, timing, registers, and 8501-based systems; technology and system design issues; flowcharts and pseudocode; an 805 primer for X86 programmers; ASCII codes; assemblers, development resources, and suppliers; and data sheets. Printed in an optically-friendly large font. The disk contains the lab manual in Microsoft Word with exercises in software programming and hardware interfacing of the 8051, and source codes in ASCII files for the text's programs. Mr. Mazidi teaches at DeVry Institute of Technology, Dallas, TX; Mrs. Mazidi co-founded Microprocessor Education Group. Annotation c. Book News, Inc., Portland, OR (booknews.com)
Read More Show Less

Product Details

  • ISBN-13: 9780138610227
  • Publisher: Prentice Hall
  • Publication date: 11/11/1999
  • Edition description: BK&DISK
  • Edition number: 1
  • Pages: 435
  • Product dimensions: 8.50 (w) x 11.00 (h) x 1.30 (d)

Read an Excerpt

Chapter 1: The 8051 Microcontrollers

This chapter begins with a discussion of the role and importance of microcontrollers in everyday life. In Section 1.1 we also discuss criteria to consider in choosing a microcontroller, as well as the use of microcontrollers in the embedded market. Section 1.2 covers various members of the 8051 family such as the 8052 and 8031, and their features. In addition, we discuss various versions of the 8051 such as the 8751, AT89C51, and DS5000.

Section 1.1: Microcontrollers And Embedded Processors

In this section we discuss the need for microcontrollers and contrast them with general-purpose microprocessors such as the Pentium and other x86 microprocessors. We also look at the role of microcontrollers in the embedded market. In addition, we provide some criteria on how to choose a microcontroller.

Microcontroller versus general-purpose microprocessor

What is the difference between a microprocessor and microcontroller? By microprocessor is meant the general-purpose microprocessors such as Intel's x86 family (8086, 80286, 80386, 80486, and the Pentium) or Motorola's 680x0 family (68000, 68010, 68020, 68030, 68040, etc.). These microprocessors contain no RAM, no ROM, and no I/O ports on the chip itself. For this reason, they are commonly referred to as general-purpose microprocessors.

A system designer using a general-purpose microprocessor such as the Pentium or the 68040 must add RAM, ROM, I/O ports, and timers externally to make them functional. Although the addition of external RAM, ROM, and I/O ports makes these systems bulkier and much more expensive, they have the advantage of versatility such that the designer can decide on the amount of RAM, ROM, and I/O ports needed to fit the task at hand. This is not the case with microcontrollers. A microcontroller has a CPU (a microprocessor) in addition to a fixed amount of RAM, ROM, I/O ports, and a timer all on a single chip. In other words, the processor, the RAM, ROM, I/O ports, and timer are all embedded together on one chip; therefore, the designer cannot add any external memory, I/O, or timer to it. The fixed amount of on-chip ROM, RAM, and number of I/O ports in microcontrollers makes them ideal for many applications in which cost and space are critical. In many applications, for example a TV remote control, there is no need for the computing power of a 486 or even an 8086 microprocessor. In many applications, the space it takes, the power it consumes, and the price per unit are much more critical considerations than the computing power. These applications most often require some I/O operations to read signals and turn on and off certain bits. For this reason some call these processors IBP, "itty-bitty processors" (see "Good Things in Small Packages Are Generating Big Product Opportunities" by Rick Grehan, BYTE magazine, September 1994; www.byte.com, for an excellent discussion of microcontrollers).

It is interesting to note that some microcontroller manufacturers have gone as far as integrating an ADC (analog-to-digital converter) and other peripherals into the microcontroller.

Microcontrollers for embedded systems

In the literature discussing microprocessors, we often see the term embedded system. Microprocessors and microcontrollers are widely used in embedded system products. An embedded product uses a microprocessor (or microcontroller) to do one task and one task only. A printer is an example of embedded system since the processor inside it performs one task only; namely, getting the data and printing it. Contrast this with a Pentium-based PC (or any x86 IBM-compatible PC). A PC can be used for any number of applications such as word processor, print-server, bank teller terminal, video game player, network server, or internet terminal. Software for a variety of applications can be loaded and run. Of course the reason a PC can perform myriad tasks is that it has RAM memory and an operating system that loads the application software into RAM and lets the CPU run it. In an embedded system, there is only one application software that is typically burned into ROM. An x86 PC contains or is connected to various embedded products such as the keyboard, printer, modem, disk controller, sound card, CD-ROM driver, mouse, and so on. Each one of these peripherals has a microcontroller inside it that performs only one task. For example, inside every mouse there is a microcontroller to perform the task of finding the mouse position and sending it to the PC. Table 1-1 lists some embedded products.

X86 PC embedded applications

Although microcontrollers are the preferred choice for many embedded systems, there are times that a microcontroller is inadequate for the task. For this reason, in recent years many manufacturers of general-purpose microprocessors such as Intel, Motorola, AMD (Advanced Micro Devices, Inc.), and Cyrix (now a division of National Semiconductor, Inc.) have targeted their microprocessor for the high end of the embedded market. While Intel, AMD, and Cyrix push their x86 processors for both the embedded and desk-top PC markets, Motorola is determined to keep the 68000 family alive by targeting it mainly for the high end of embedded systems now that Apple no longer uses the 680x0 in their Macintosh. In the early 1990s Apple computer began using Power PC microprocessors (604, 603, 620, etc.) in place of the 680x0 for the Macintosh. The Power PC microprocessor is a joint venture between IBM and Motorola, and is targeted for the high end of the embedded market as well as the PC market. It must be noted that when a company targets a general-purpose microprocessor for the embedded market it optimizes the processor used for embedded systems. For this reason these processors are often called high-end embedded processors. Very often the terms embedded processor and microcontroller are used interchangeably.

One of the most critical needs of an embedded system is to decrease power consumption and space. This can be achieved by integrating more functions into the CPU chip. All the embedded processors based on the x86 and 680x0 have low power consumption in addition to some forms of I/O, COM port, and ROM all on a single chip. In high-performance embedded processors, the trend is to integrate more and more functions on the CPU chip and let the designer decide which features he/she wants to use. This trend is invading PC system design as well. Normally, in designing the PC motherboard we need a CPU plus a chip-set containing I/O, a cache controller, a flash ROM containing BIOS, and finally a secondary cache memory. New designs are emerging in industry. For example, Cyrix has announced that it is working on a chip that contains the entire PC, except for DRAM. In other words, we are about to see an entire computer on a chip.

Currently, because of MS-DOS and Windows standardization many embedded systems are using x86 PCs. In many cases using x86 PCs for the highend embedded applications not only saves money but also shortens development time since there is a vast library of software already written for the DOS and Windows platforms. The fact that Windows is a widely used and well understood platform mans that developing a Windows-based embedded product reduces the cost and shortens the development time considerably.

Choosing a microcontroller

There are four major 8-bit microcontrollers. They are: Motorola's 6811, Intel's 8051, Zilog's Z8, and PIC 16X from Microchip Technology. Each of the above microcontrollers has a unique instruction set and register set; therefore, they are not compatible with each other. Programs written for one will not run on the others. There are also 16-bit and 32-bit microcontrollers made by various chip makers. With all these different microcontrollers, what criteria do designers consider in choosing one? Three criteria in choosing microcontrollers are as follows: (1) meeting the computing needs of the task at hand efficiently and cost effectively, (2) availability of software development tools such as compilers, assemblers, and debuggers, and (3) wide availability and reliable sources of the microcontroller. Next we elaborate further on each of the above criteria.

Criteria for choosing a microcontroller

1. The first and foremost criterion in choosing a microcontroller is that it must meet the task at hand efficiently and cost effectively. In analyzing the needs of a microcontroller-based project, we must first see whether an 8-bit, 16-bit, or 32-bit microcontroller can best handle the computing needs of the task most effectively. Among other considerations in this category are:

(a) Speed. What is the highest speed that the microcontroller supports?

(b) Packaging. Does it come in 40-pin DIP (dual inline package) or a QFP (quad flat package), or some other packaging format? This is important in terms of space, assembling, and prototyping the end product.

(c) Power consumption. This is especially critical for battery-powered products.

(d) The amount of RAM and ROM on chip.

(e) The number of I/O pins and the timer on the chip.

(f) How easy it is to upgrade to higher-performance or lower power-consumption versions.

(g) Cost per unit. This is important in terms of the final cost of the product in which a microcontroller is used. For example, there are microcontrollers that cost 50 cents per unit when purchased 100,000 units at a time.

2. The second criterion in choosing a microcontroller is how easy it is to develop products around it. Key considerations include the availability of an assembler, debugger, a code-efficient C language compiler, emulator, technical support, and both in-house and outside expertise. In many cases, third-party vendor (that is, a supplier other than the chip manufacturer) support for the chip is as good as, if not better than, support from the chip manufacturer.

3. The third criterion in choosing a microcontroller is its ready availability in needed quantities both now and in the future. For some designers this is even more important than the first two criteria. Currently, of the leading 8-bit microcontrollers, the 8051 family has the largest number of diversified (multiple source) suppliers. By supplier is meant a producer besides the originator of the microcontroller. In the case of the 8051, which was originated by Intel, several companies also currently produce (or have produced in the past) the 8051. These companies include: Intel, Atmel, Philips/Signetics, AMD, Siemens, Matra, and Dallas Semiconductor.

It should be noted that Motorola, Zilog, and Microchip Technology have all dedicated massive resources to ensure wide and timely availability of their product since their product is stable, mature, and single sourced. In recent years they also have begun to sell the ASIC library cell of the microcontroller...

Read More Show Less

Table of Contents

Introduction to Computing.
1. The 8051 Microcontrollers.
2. 8051 Assembly Language Programming.
3. Jump, Loop, and Call Instructions.
4. I/O Ports Programming.
5. 8051 Addressing Modes.
6. Arithmetic Instructions and Programs.
7. Logic Instructions and Programs.
8. Single-Bit Instructions and Programming.
9. Timer/Counter Programming in the 8051.
10. 8051 Serial Communication.
11. Interrupts Programming.
12. Real World Interfacing I: LCD, ADC, and Sensors.
13. Real World Interfacing II: Stepper Motor, Keyboard, DAC.
14. 8051/31 Interfacing to External Memory.
15. 8031/51 Interfacing to the 8255.
Appendix A: 8051 Instructions, Timing, and Registers.
Appendix B: 8051-Based Systems: Wire-Wrapping and Testing.
Appendix C: IC Technology and System Design Issues.
Appendix D: Flowcharts and Pseudocode.
Appendix E: 8051 Primer for x86 Programmers.
Appendix F: ASCII Codes.
Appendix G: Assemblers, Development Resources, and Suppliers.
Appendix H: Data Sheets.
Read More Show Less


Products using microprocessors generally fall into two categories. The first category uses high-performance microprocessors such as the Pentium in applications where system performance is critical. We have an entire book dedicated to this topic, The 80x86 IBMPC and Compatible Computers, Volumes I and II, from Prentice Hall. In the second category of applications, performance is secondary; issues of space, power, and rapid development are more critical than raw processing power. The microprocessor for this category is often called a microcontroller.

This book is for the second category of applications. The 8051 is a widely used microcontroller. There are many reasons for this, including the existence of multiple producers and its simple architecture. This book is intended for use in college-level courses teaching microcontrollers and embedded systems. It not only establishes a foundation of assembly language programming, but also provides a comprehensive treatment of 8051 interfacing for engineering students. From this background, the design and interfacing of microcontroller-based embedded systems can be explored. This book can be also used by practicing technicians, hardware engineers, computer scientists, and hobbyists. It is an ideal source for those building stand-alone projects, or projects in which data is collected and fed into a PC for distribution on a network.


Readers should have had an introductory digital course. Knowledge of a programming language would be helpful but is not necessary. Although the book is written for those with no background in assembly language programming, students with prior assembly language experience will be ableto gain a mastery of 8051 architecture very rapidly and start on their projects right away.


A systematic step-by-step approach is used to cover various aspects of 8051 Assembly language programming and interfacing. Many examples and sample programs are given to clarify the concepts and provide students with an opportunity to learn by doing. Review questions are provided at the end of each section to reinforce the main points of the section.

Chapter 0 covers number systems (binary, decimal, and hex), and provides an introduction to basic logic gates and computer terminology. This is designed especially for students, such as mechanical engineering students, who have not taken a digital logic course or those who need to refresh their memory on these topics.

Chapter 1 discusses 8051 history and features of other 8051 family members such as the 8751, 89C51, DS5000, and 8031. It also provides a list of various producers of 8051 chips.

Chapter 2 discusses the internal architecture of the 8051 and explains the use of an 8051 assembler to create ready-to-run programs. It also explores the stack and the flag register.

In Chapter 3 the topics of loop, jump, and call instructions are discussed, with many programming examples.

Chapter 4 is dedicated to the discussion of I/O ports. This allows students who are working on a project to start experimenting with 8051 I/O interfacing and start the project as soon as possible.

Chapter 5 covers the 8051 addressing modes and explains how to use the code space of the 8051 to store data, as well as how to access data.

Chapter 6 is dedicated to arithmetic instructions and programs.

Logic instructions and programs are covered in Chapter 7.

In Chapter 8 we discuss one of the most important features of the 8051, bit manipulation, as well as single-bit instructions of the 8051.

Chapter 9 describes the 8051 timers and how to use them as event-counters.

Chapter 10 is dedicated to serial data communication of the 8051 and its interfacing to the RS232. It also shows 8051 communication with COM ports of the IBM PC and compatible computers.

Chapter 11 provides a detailed discussion of 8051 interrupts with many examples on how to write interrupt handler programs.

Chapter 12 shows 8051 interfacing with real-world devices such as LCDs, ADCs, and sensors.

Chapter 13 shows 8051 interfacing with real world devices such as the keyboard, stepper motors, and DAC devices.

In Chapter 14 we cover 8031/51 interfacing with external memories, both ROM and RAM.

Finally, in Chapter 15 the issue of adding more ports to the 8031/51 is discussed, and the interfacing of an 8255 chip with the microcontroller is covered in detail.

The appendices have been designed to provide all reference material required for the topics covered in the book. Appendix A describes each 8051 instruction in detail, with examples. Appendix A also provides the clock count for instructions, 8051 register diagrams, and RAM memory maps. Appendix B describes wire wrapping, and how to design your own 8051 trainer board based on 89C51 or DS5000 chips. Appendix C covers IC technology and logic families, as well as 8051 I/O port interfacing and fan-out. Make sure you study this before connecting the 8051 to an external device. In Appendix D, the use of flowcharts and psuedocode is explored. Appendix E is for students familiar with x86 architecture who need to make a rapid transition to 8051 architecture. Appendix F provides the table for ASCII characters. Appendix G lists resources for assembler shareware, and electronics parts. Appendix H contains data sheets for the 8051 and other IC chips.

Diskette contents

The diskette attached to the book contains the lab manual, which has many experiments for software programming and hardware interfacing of the 8051. These are in Microsoft Word 97 format. In addition, the diskette contains the source code for all the programs in the book (in ASCII files). Also on the diskette are two guides for using 8051 assemblers and simulators from Franklin Software and Keil Corporation.


This book is the result of the dedication and encouragement of many individuals. Our sincere and heartfelt appreciation goes to all of them.

First, we would like to thank Professor Danny Morse, the most knowledgeable and experienced person on the 8051 that we know. He felt a strong need for a book such as this, and due to his lack of time he encouraged us to write it. He is the one who introduced us to this microcontroller and was always there, ready to discuss issues related to 8051 architecture.

Also we would like to express our sincere thanks to Professor Clyde Knight of Devry Institute of Technology for his helpful suggestions on the organization of the book.

In addition, the following professors and students found errors while using the book in its pre-publication form in their microcontroller course, and we thank them sincerely: Professor Phil Golden and John Berry of DeVry Institute of Technology, Robert Wrightson, Priscilla Martinez, Benjamin Fombon, David Bergman, John Higgins, Scot Robinson, Jerry Chrane, James Piott, Daniel Rusert, Michael Beard, Landon Hull, Jose Lopez, Larry Hill, David Johnson, Jerry Kelso, Michael Marshall, Marc Hoang, Trevor Isra.

Mr. Rolin McKinlay, an excellent student of the 8051, made many valuable suggestions, found many errors, and helped to produce the solution manual for the end-of-chapter problems. We sincerely appreciate his enthusiasm for this book.

Finally, we would like to thank the people at Prentice Hall, in particular our publisher, Mr. Charles Stewart, who continues to support and encourage our writing, and our production editor Alex Wolf who made the book a reality.

We enjoyed writing this book, and hope you enjoy reading it and using it for your courses and projects. Please let us know if you have any suggestions or find any errors.

Read More Show Less

Customer Reviews

Average Rating 4.5
( 2 )
Rating Distribution

5 Star


4 Star


3 Star


2 Star


1 Star


Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation


  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing all of 2 Customer Reviews
  • Anonymous

    Posted April 9, 2003

    excellent foundation for 8051 work

    If you want to pop the hood and really get into the basics of the 8051 this is the book. Very well written with thorough examples, the 'Masters and Johnson' of the 8051. I have purchased many other 8051 books but wish I had begun with this one.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted November 11, 2008

    No text was provided for this review.

Sort by: Showing all of 2 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)