MCP3201 Microchip Technology, MCP3201 Datasheet - Page 15

no-image

MCP3201

Manufacturer Part Number
MCP3201
Description
2.7V 12-Bit A/D Converter with SPI Serial Interface
Manufacturer
Microchip Technology
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
MCP3201-BI/P
Manufacturer:
AD
Quantity:
1 176
Part Number:
MCP3201-BI/SN
Manufacturer:
DIODES
Quantity:
15 000
Part Number:
MCP3201-BI/SN
Manufacturer:
MICROCHI
Quantity:
20 000
Part Number:
MCP3201-BI/SN
0
Part Number:
MCP3201-CI/MS
Manufacturer:
ON
Quantity:
11 455
Part Number:
MCP3201-CI/P
Manufacturer:
DIODES
Quantity:
21 000
Part Number:
MCP3201-CI/P
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
MCP3201-CI/SN
Manufacturer:
MICROCHIP
Quantity:
2 100
Part Number:
MCP3201-CI/SN
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
MCP3201-CI/SN
0
Part Number:
MCP3201-CI/ST
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
MCP3201T-BI/SN
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
6.0
6.1
With most microcontroller SPI ports, it is required to
clock out eight bits at a time. If this is the case, it will be
necessary to provide more clocks than are required for
the MCP3201. As an example, Figure 6-1 and
Figure 6-2 show how the MCP3201 can be interfaced
to a microcontroller with a standard SPI port. Since the
MCP3201 always clocks data out on the falling edge of
clock, the MCU SPI port must be configured to match
this operation. SPI Mode 0,0 (clock idles low) and SPI
Mode 1,1 (clock idles high) are both compatible with the
MCP3201. Figure 6-1 depicts the operation shown in
SPI Mode 0,0, which requires that the CLK from the
microcontroller idles in the ‘low’ state. As shown in the
diagram, the MSB is clocked out of the A/D Converter
on the falling edge of the third clock pulse. After the first
eight clocks have been sent to the device, the micro-
controller’s receive buffer will contain two unknown bits
FIGURE 6-1:
FIGURE 6-2:
1999 Microchip Technology Inc.
APPLICATIONS INFORMATION
Using the MCP3201 with
Microcontroller SPI Ports
D
CLK
D
CLK
CS
OUT
CS
OUT
SPI Communication using 8-bit segments (Mode 0,0: SCLK idles low).
SPI Communication using 8-bit segments (Mode 1,1: SCLK idles high).
HI-Z
HI-Z
?
?
1
Data stored into MCU receive register
1
Data stored into MCU receive register
?
after transmission of first 8 bits
after transmission of first 8 bits
?
2
2
NULL
NULL
BIT
0
BIT
0
3
3
B11
B11
B11
B11
4
4
B10
B10
B10
B10
5
5
B9
B9
B9
B9
6
6
B8
B8
B8
B8
7
7
B7
B7
B7
8
B7
8
Preliminary
B6
B6
B6
B6
Data stored into MCU receive register
9
9
Data stored into MCU receive register
after transmission of second 8 bits
after transmission of second 8 bits
B5
B5
B5
B5
10
10
B4
B4
11
B4
B4
11
(the output is at high impedance for the first two clocks),
the null bit and the highest order five bits of the conver-
sion. After the second eight clocks have been sent to
the device, the MCU receive register will contain the
lowest order seven bits and the B1 bit repeated as the
A/D Converter has begun to shift out LSB first data with
the extra clock. Typical procedure would then call for
the lower order byte of data to be shifted right by one bit
to remove the extra B1 bit. The B7 bit is then trans-
ferred from the high order byte to the lower order byte,
and then the higher order byte is shifted one bit to the
right as well. Easier manipulation of the converted data
can be obtained by using this method.
Figure 6-2 shows the same thing in SPI Mode 1,1
which requires that the clock idles in the high state. As
with mode 0,0, the A/D Converter outputs data on the
falling edge of the clock and the MCU latches data from
the A/D Converter in on the rising edge of the clock.
B3
B3
B3
12
B3
12
B2
B2
13
B2
B2
13
B1
B1
14
B1
B1
14
B0
B0
15
B0
B0
15
B1
B1
16
B1
B1
16
B2
HI-Z
HI-Z
LSB first data begins
to come out
LSB first data begins
to come out
MCU latches data from A/D Converter
on rising edges of SCLK
Data is clocked out of
A/D Converter on falling edges
MCU latches data from A/D Converter
on rising edges of SCLK
MCP3201
Data is clocked out of
A/D Converter on falling edges
DS21290B-page 15

Related parts for MCP3201