3 read-modify-write instructions, 4 reprogrammable peripheral controller (rpc), Odify – Maxim Integrated Secure Microcontroller User Manual

Page 104: Rite, Nstructions, Eprogrammable, Eripheral, Ontroller, Rpc)

Advertising
background image

Secure Microcontroller User’s Guide

104 of 187

12.3 Read-Modify-Write Instructions

MNEMONIC

DESCRIPTION

ANL

Logical AND

ORL

Logical OR

XRL

Logical Exclusive OR

JBC

Branch if Bit Set and Clear (bit)

CPL

Complement Bit

INC

Increment

DEC

Decrement

DJNZ

Decrement and Branch if not Zero

MOV PX.n,C

Move Carry Bit to bit n of Port X

CLR PX.n

Clear bit n in Port X

SETB PX.n

Set bit n in Port X

12.4 Reprogrammable Peripheral Controller (RPC)

The reprogrammable peripheral controller (RPC) mode of the DS5001FP and DS5002FP emulate the
8042 slave hardware interface commonly used in IBM-compatible PCs for control of peripherals such as
a keyboard or a mouse device. In addition to a direct interface to the PC AT bus, the device brings the
advantages of up to 128kB of reprogrammable, nonvolatile program and data memory to intelligent
peripheral control. The nonvolatile data memory accessed by the device can be used for system
configuration, hard disk setup parameters, or even maintenance records.

In operating as a slave controller, the device communicates with a host processor via three resource
registers: data bus-buffer in (DBBIN), data bus-buffer out (DBBOUT), and status (STATUS). The host
may read data or status and write data or commands. The STATUS register provides information about
DBBIN, DBBOUT, and user-defined flags. Both DBBIN and DBBOUT share special function register
address 80H with Port 0. The context will determine which register is used. The STATUS register is at
SFR location 0DAH.

To enable the RPC mode, the RPCON bit in the RPCTL register (see RPC Control Register–RPCTL
(Address 0D8H)
) must be set to 1. At this time, Ports 0 and 2 are reconfigured to emulate the 8042
hardware interface as shown in

Figure 12-6

. Port 0 becomes an 8-bit data bus that can connect directly to

a PC data bus. Port 2 provides the control and address information for the data bus. Both ports are true
bidirectional I/O devices in this mode. Normal operation of these ports is suspended when RPC mode is
enabled. The modified port functions are described as follows:


Port 0

D0–7

This is the 8-bit bidirectional data bus of the RPC. It can interface directly to a PC or other
host.


Port 2.0

A0

Address input used to determine whether the data bus word is data or command/status.

Port 2.1

CE

If a multiple RPC mode environment is required, this input can be used to select an
individual DS5001 on a common bus.

Port 2.2

RD

Input that allows the host to read data or status from the DBBOUT or STATUS.

Advertising