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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.