MCP3304 Microchip Technology, MCP3304 Datasheet - Page 25

no-image

MCP3304

Manufacturer Part Number
MCP3304
Description
13-Bit Differential Input, Low Power A/D Converter with SPI Serial Interface
Manufacturer
Microchip Technology
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
MCP3304-BI/P
Manufacturer:
MICROCHIP
Quantity:
12 000
Part Number:
MCP3304-BI/P
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
MCP3304-BI/SL
Manufacturer:
MICROCHIP
Quantity:
12 000
Part Number:
MCP3304-BI/SL
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
MCP3304-CI/P
Manufacturer:
MICROCHIP
Quantity:
12 000
Part Number:
MCP3304-CI/P
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
MCP3304-CI/SL
Manufacturer:
MICROCHIP
Quantity:
12 000
Part Number:
MCP3304-CI/SL
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
MCP3304T-BI/SL
Manufacturer:
MICROCHIP
Quantity:
12 000
Part Number:
MCP3304T-BI/SL
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
7.3
With most microcontroller SPI ports, it is required to
send groups of eight bits. It is also required that the
microcontroller SPI port be configured to clock out data
on the falling edge of clock and latch data in on the ris-
ing edge. Because communication with the MCP3302
and MCP3304 devices may not need multiples of eight
clocks, it will be necessary to provide more clocks than
are required. This is usually done by sending ‘leading
zeros’ before the start bit. For example, Figure 7-4 and
Figure 7-5 show how the MCP3302/04 devices can be
interfaced to a MCU with a hardware SPI port.
Figure 7-4 depicts the operation shown in SPI Mode
0,0, which requires that the SCLK from the MCU idles
in the ‘low’ state, while Figure 7-5 shows the similar
case of SPI Mode 1,1, where the clock idles in the ‘high’
state.
As shown in Figure 7-4, the first byte transmitted to the
A/D Converter contains 6 leading zeros before the start
bit. Arranging the leading zeros this way produces the
13 data bits to fall in positions easily manipulated by the
MCU. The sign bit is clocked out of the A/D Converter
on the falling edge of clock number 11, followed by the
remaining data bits (MSB first). After the second eight
clocks have been sent to the device, the MCU receive
buffer will contain 2 unknown bits (the output is at high
impedance for the first two clocks), the null bit, the sign
bit and the 4 highest order bits of the conversion. After
the third byte has been sent to the device, the receive
register will contain the lowest order eight bits of the
conversion results. Easier manipulation of the con-
verted data can be obtained by using this method.
Figure 7-5 shows the same situation 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.
© 2007 Microchip Technology Inc.
Using the MCP3302/04 with
Microcontroller (MCU) SPI Ports
MCP3302/04
DS21697C-page 25

Related parts for MCP3304