Datasheet

Table Of Contents
PIC18F87J72 FAMILY
DS39979A-page 450 Preliminary 2010 Microchip Technology Inc.
B.5.3 READING FROM THE DEVICE
The first data byte read is the one defined by the
address given in the control byte. After this first byte is
transmitted, if the CS
pin is maintained low, the com-
munication continues and the address of the next
transmitted byte is determined by the status of the
READ bits in the STATUS/COM register. Multiple
looping configurations can be defined through the
READ<1:0> bits for the address increment (see
Section B.5.6 “SPI Mode 0,0 - Clock Idle Low,
Read/Write Examples”).
B.5.4 WRITING TO THE DEVICE
The first data byte written is the one defined by the
address given in the control byte. The write
communication automatically increments the address
for subsequent bytes.
The address of the next transmitted byte within the
same communication (CSA
stays low) is the next
address defined on the register map. At the end of the
register map, the address loops to the beginning of the
register map. Writing a non-writable register has no
effect.
The SDOA pin stays in a high-impedance state during
a write communication.
B.5.5 SPI MODE 1,1 – CLOCK IDLE HIGH,
READ/WRITE EXAMPLES
In this SPI mode, the clock Idles high. For the AFE, this
means that there will be a falling edge before there is a
rising edge.
FIGURE B-7: DEVICE READ (SPI MODE 1,1 – CLOCK IDLES HIGH)
FIGURE B-8: DEVICE WRITE (SPI MODE 1,1 – CLOCK IDLES HIGH)
Note: Changing from an SPI Mode 1,1 to an SPI
Mode 0,0 is possible, but needs a Reset
pulse in-between to ensure correct
communication.
SCK
SDI
SDO
CS
A6
A5
A4
A3
A2
A1
A0
D6
D5
D4
D3
D2
D1
D0
(ADDRESS) DATA
(ADDRESS + 1) DATA
D6
D5
D4
D3
D2
D1
Data Transitions on
the Falling Edge
AFE Latches
Bits on the Rising Edge
D0
HI-Z
HI-Z
D7
D7
R/W
HI-Z
SCK
SDI
SDO
CS
R/W
A6
A5
A4
A3
A2
A1
A0
D7 D6
D5
D4
D3
D2
D1
(ADDRESS) DATA
(ADDRESS + 1) DATA
D6
D5
D4
D3
D2
D1
D0
Data Transitions on
the Falling Edge
AFE Latches
Bits on the Rising Edge
D0
HI-Z
HI-Z
D7
HI-Z