Microprocessors - PowerPoint PPT Presentation

1 / 6
About This Presentation
Title:

Microprocessors

Description:

A VERY BIG DEAL. To use these instructions, you must first configure the pins for input! ... JB PX.Y, dest Tests a single port pin. ... – PowerPoint PPT presentation

Number of Views:30
Avg rating:3.0/5.0
Slides: 7
Provided by: davidlk2
Category:

less

Transcript and Presenter's Notes

Title: Microprocessors


1
Microprocessors
  • Single-bit Instructions Ch8

2
Addressable Bits
3
General Single-bit Instruction Set
  • SETB bit forces a 1
  • CLR bit forces a 0
  • CPL bit forces a change
  • JB bit,destination checks bit and jumps on 1
  • JNB bit, destination checks bit and jumps on 0
  • JBC bit, destination checks bit, forces a 0 and
    jumps on 1.

4
CY Single-bit Instruction Set
  • MOV bit, C copies CY into addressed bit
  • MOV C, bit copies bit addressed bit into CY
  • JNC destination jumps if CY 0
  • JC destination jumps if CY 1
  • ANL C, bit CY CY ANDed to addressed bit
  • ANL C, /bit CY CY ANDed to comp bit
  • ORL C, bit CY CY ORed to addressed bit
  • ORL C, /bit CY CY ORed to comp bit

5
A VERY BIG DEALTo use these instructions, you
must first configure the pins for input!
  • MOV A, PX Reads all 8 port pins.
  • MOV C, PX.Y Reads a single port pin.
  • JNB PX.Y, dest Tests a single port pin.
  • JB PX.Y, dest Tests a single port pin.

6
These instructions read a port not configured for
input.
  • ANL Px
  • ORL Px
  • XRL Px
  • JBC Px.y, dest
  • CPL Px.y
  • INC Px
  • DEC Px
  • DJNZ Px.y, dest
  • MOV Px.y
  • CLR Px.y
  • SETB Px.y
Write a Comment
User Comments (0)
About PowerShow.com