Datasheet

2003-2012 Microchip Technology Inc. DS21117B-page 19
MCP6S21/2/6/8
5.2 Registers
The analog functions are programmed through the SPI
interface using 16-bit words (see Figure 5-1 and
Figure 5-2). This data is sent to two of three 8-bit regis-
ters: Instruction Register (Register 5-1), Gain Register
(Register 5-2) and Channel Register (Register 5-3).
The power-up defaults for these three registers are:
Instruction Register: 000x xxx0
Gain Register: xxxx x000
Channel Register: xxxx x000
Thus, these devices are initially programmed with the
Instruction Register set for NOP (no operation), a gain
of +1 V/V and CH0 as the input channel.
5.2.1 INSTRUCTION REGISTER
The Instruction Register has 3 command bits and 1
indirect address bit; see Register 5-1. The command
bits include a NOP (000) to support daisy chaining (see
Section 5.3, “Registers”); the other NOP commands
shown should not be used (they are reserved for future
use). The device is brought out of Shutdown mode
when a valid command, other than NOP or Shutdown, is
sent and CS
is raised.
REGISTER 5-1: INSTRUCTION REGISTER
W-0 W-0 W-0 U-x U-x U-x U-x W-0
M2 M1 M0 —A0
bit 7 bit 0
bit 7-5 M2-M0: Command Bits
000 = NOP (Default) (Note 1)
001 = PGA enters Shutdown Mode as soon as a full 16-bit word is sent and CS
is raised.
(Notes 1 and 2)
010 = Write to register.
011 = NOP (reserved for future use) (Note 1)
1XX = NOP (reserved for future use) (Note 1)
bit 4-1 Unimplemented: Read as ‘0’ (reserved for future use)
bit 0 A0: Indirect Address Bit
1 = Addresses the Channel Register
0 = Addresses the Gain Register (Default)
Note 1: All other bits in the 16-bit word (including A0) are “don’t cares”.
2: The device exits Shutdown mode when a valid command (other than NOP or Shut-
down) is sent and CS
is raised; that valid command will be executed. Shutdown
does not toggle.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ’1’ = Bit is set ’0’ = Bit is cleared x = Bit is unknown