7

PROGRAMMING EXAMPLES-I

CHAPTER OBJECTIVES

In the last three chapters, the reader was introduced to a few MCS-51 instructions like data moving and loading, arithmetic operations and program branching. In this chapter, we will discuss applications of these instructions through a few example cases of programming. After completion of the chapter, the reader should be able to understand how these instructions may be properly utilized to

  • Manipulate data in different ways using pointers.
  • Use counters for iterations.
  • Plan any program flow and necessary branching.
  • Perform some basic arithmetic operations.

7.1 | Introduction

So far, we have made ourselves familiar with some, though not all, instructions of MCS-51 in the previous three chapters. Using ...

Get 8051 Microcontrollers, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.