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 ...

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.