O'Reilly logo

8051 Microcontrollers, 2nd Edition by Subrata Ghoshal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

13

PROGRAMMING EXAMPLES-III

CHAPTER OBJECTIVES

As we have completed discussions of all MCS-51 instructions, it may not be inappropriate to study a few more example programs highlighting certain software development techniques. After completion of the chapter, the reader should be able to understand

  • How to communicate with external data memory using MOVX instruction.
  • How to use table look-up method and MOVC instruction.
  • How to convert a hexadecimal number to its BCD form using DA A instruction.
  • How to use XCH, XCHD and SWAP instructions.
  • How to use flag bits and bit-addressable area of internal data memory.

13.1 | Compare with External Array

Example 13.1

Purpose: How to access an array located within external data memory.

Problem

An array of ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required