Datasheet

MCP454X/456X/464X/466X
DS22107B-page 64 2008-2013 Microchip Technology Inc.
7.7 Decrement Wiper
Normal and High Voltage
The Decrement Command provide a quick and easy
method to modify the potentiometer’s wiper by -1 with
minimal overhead. The Decrement Command will only
function on the volatile wiper setting memory locations
00h and 01h. Decrement Commands to Nonvolatile
addresses will be ignored and will generate an A
bit.
When executing a Decrement Command, the volatile
wiper setting will be altered from n to n-1 for each
Decrement Command received. The value will
decrement down to 000h min. If multiple Decrement
Commands are received after the value has reached
000h, the value will not be decremented further.
Table 7-5 shows the Increment Command versus the
current volatile wiper value.
The Decrement Command will most commonly be
performed on the Volatile Wiper locations until a
desired condition is met. The value in the Volatile Wiper
register would need to be read using a Read operation
in order to write the new setting to the corresponding
Nonvolatile wiper memory using a Write operation. The
MCP4XXX is responsible for generating the A bits.
Refer to Figure 7-8 for the Decrement Command
sequence. The sequence is terminated by the Stop
condition. So when executing a continuous command
string, the Increment command can be followed by any
other valid command. This means that writes do not
need to be to the same volatile memory address.
The advantage of using an Decrement Command
instead of a read-modify-write series of commands is
speed and simplicity. The wiper will transition after each
Command Acknowledge when accessing the volatile
wiper registers.
TABLE 7-5: DECREMENT OPERATION VS.
VOLATILE WIPER VALUE
7.7.1 THE HIGH VOLTAGE COMMAND
(HVC) SIGNAL
The High Voltage Command (HVC) signal is
multiplexed with Address 0 (A0) and is used to indicate
that the command, or sequence of commands, are in
the High Voltage mode. Signals > V
IHH
(~8.5V) on the
HVC/A0 pin puts MCP45XX/46XX devices into High
Voltage mode. High Voltage commands allow the
device’s WiperLock Technology and write protect
features to be enabled and disabled.
The HVC pin has an internal resistor connection to the
MCP45XX/46XXs internal V
DD
signal.
FIGURE 7-8: I
2
C Decrement Command Sequence.
Note: Table 7-2 shows the valid addresses for
the Decrement Wiper command. Other
addresses are invalid.
Note: The command sequence can go from an
increment to any other valid command for
the specified address. Issuing an
increment or decrement to a nonvolatile
location will cause an error condition (A
will be generated).
Current Wiper
Setting
Wiper (W)
Properties
Decrement
Command
Operates?
7-bit
Pot
8-bit
Pot
3FFh
081h
3FFh
101h
Reserved
(Full-Scale (W = A))
No
080h 100h Full-Scale (W = A) Yes
07Fh
041h
0FFh
081
W = N
040h 080h W = N (Mid-Scale) Yes
03Fh
001h
07Fh
001
W = N
000h 000h Zero Scale (W = B) No
Note: There is a required delay after the HVC pin
is driven to the V
IHH
level to the 1st edge
of the SCL pin.
Control Byte
DECR Command (n-1) DECR Command (n-2)
1010SA2A1A00 1
AD
AD
AD
AD
A0XXA1
AD AD AD AD
0X XAP
(2)
0
1
23
4321
Fixed
Address
Variable
Address
Device
Memory
Address
Command
Write bit
Note 1:
Decrement Command (DECR) only functions when accessing the volatile wiper
registers (AD3:AD0 = 0h and 1h).
2: This command sequence does not need to terminate (using the Stop bit) and can
change to any other desired command sequence (INCR, Read, or Write).