beautypg.com

1 writing in spi, Figure 7. control port timing, i·c format, Figure 8. control port timing, spi format – Cirrus Logic CS4382 User Manual

Page 31: 5 memory address pointer (map), 1 incr (auto map increment enable), Cs4382

background image

DS514F2

31

CS4382

7.4.1

Writing in SPI

Figure 8

shows the operation of the control port in SPI format. To write to a register, bring CS low. The

first 7 bits on CDIN form the chip address and must be 0011000. The eighth bit is a read/write indicator
(R/W), which must be low to write. The next 8 bits form the Memory Address Pointer (MAP), which is set
to the address of the register that is to be updated. The next 8 bits are the data which will be placed into
register designated by the MAP. To write multiple registers, keep CS low and continue providing clocks
on CCLK. End the read transaction by setting CS high.

7.5

Memory Address Pointer (MAP)

7.5.1

INCR (Auto Map Increment Enable)

Default = ‘0’

0 - Disabled

1 - Enabled

Note:

When Auto Map Increment is enabled, the register must be written it two separate blocks: from

register 01h to 08h and then from 09h and 11h. The counter will not auto-increment to register 09h from
register 08h

7

6

5

4

3

2

1

0

INCR

Reserved

Reserved

MAP4

MAP3

MAP2

MAP1

MAP0

0

0

0

0

0

0

0

0

S D A

S C L

0 0 1 1 0 0

A D D R
A D 0

R /W

S ta rt

A C K

D A T A
1 -8

A C K

D A T A
1 -8

A C K

S to p

N o te : If o p e ra tio n i s a w rite , th is b y te c o n ta in s th e M e m o ry A d d r e s s P o in te r, M A P .

N o te 1

Figure 7. Control Port Timing, I²C Format

M A P

M S B

L S B

D A T A

b y t e 1

b y t e n

R / W

M A P = M e m o r y A d d r e s s P o in t e r

A D D R E S S

C H I P

C D I N

C C L K

C S

0 0 1 1 0 0 0

Figure 8. Control Port Timing, SPI Format