USBmicro

Your source for USB electrical device interface products.

  • Home
  • Services
    • Design
    • Contact USBmicro
  • Where to buy…
You are here: Home / Documentation / Application Notes / App8: SPI ADC

App8: SPI ADC

Purpose

Provide a program that interfaces to an analog to digital converter through the SPI port. This example uses the LTC1298, a 12 bit two channel ADC.

Description

This program initializes thirteen i⁄o lines of the U401⁄U421⁄U451 to be outputs, and enables the SPI subsystem. The LTC1298, a 12-bit serial (SPI) A⁄D device, is connected to the MISO, MOSI, and CLK lines, as well as one of the output lines. The program selects the ADC device, selects channel 0, and reads the converted analog value. This is repeated for channel 1.

Screen Shot

Below is the application screen reading some A⁄D values.

Hardware

The datasheet for the LTC1298 was followed for connection to the U4x1 device. Bypass capacitors are not shown in the schematic.

Pin 1 of the LTC1298 is the active low chip select and is controlled by port A.4. MOSI of the U4x1 (A.5) connects to the A⁄D “D in” to send a command to the A⁄D, while MISO (A.6) reads the data from “D out”. The SPI clock (A.7) connects to pin 7, the LTC1298’s clock line.

 

SPI Devices


Example SPI devices:

ADC

Analog Devices (www.analog.com)

AD7715, AD7811, AD7812, AD7816, AD7817, AD7818, AD7853, AD7858

Burr Brown (www.burr-brown.com)

ADS1210, ADS1211, ADS1212, ADS1213, ADS1286, ADS7812, ADS7813, ADS7818, ADS7834, ADS7835

Cirrus (www.cirrus.com)

CS5531, CS5533, CS5532, CS5534

Linear Technology (www.linear-tech.com)

LTC1091, LTC1092, LTC1093, LTC1094, LTC1096, LTC1098, LTC1197, LTC1199, LTC1285, LTC1288, LTC1287, LTC1289, LTC1290, LTC1291, LTC1286, LTC1298, LTC1404, LTC1418, LTC1594, LTC1598, LTC2400, LTC2408, LTC2410, LTC2420

Maxim (www.maxim-ic.com)

MAX144, MAX145, MAX146, MAX147, MAX157, MAX159, MAX186, MAX188, MAX1084, MAX1085, MAX1106, MAX1107, MAX1110, MAX1111, MAX1112, MAX1113, MAX1202, MAX1203, MAX1204, MAX1240, MAX1241, MAX1242, MAX1243, MAX1270, MAX1271, MAX1400, MAX1401, MAX1402, MAX1403

Microchip (www.microchip.com)

MCP3001, MCP3002, MCP3004, MCP3008, MCP3201, MCP3202, MCP3204, MCP3208

Texas Instruments (www.ti.com)

TLV1504, TLV1508, TLV1544, TLV1570, TLV1572, TLC1514, TLC1518, TLV2541, TLV2542, TLV2545, TLV2544, TLV2548, TLC2554, TLC2558,

EEPROM⁄Serial Non-volatile

Atmel (www.atmel.com)

AT25010, AT25020, AT25040, AT25080, AT25160, AT25320, AT25640, AT25P1024, AT25HP256, AT45D011, AT45D021, AT45DB021, AT45DB041, AT45D081, AT45DB161

Fairchild (www.fairchildsemi.com)

NM25C020, NM25C040, NM25C041, NM25C160, NM25C640, NM93C06, NM93C56, NM93C66, NM93C46, NM93C56, NM93C46A, NM93C46A, NM93S46, NM93S56

Microchip (www.microchip.com)

25AA040, 25LC040, 25C040, 25AA080, 25LC080, 25C080, 25AA160, 25LC160, 25C160, 25LC320, 25C320, 25AA640, 25LC640

NexFlash (www.nexflash.com)

NX25F011A, NX25F041A, NX25F080A, NX25M

RAMTRON (www.ramtron.com)

FM25L256, FM25W256, FM25CL64, FM25640, FM25CL160, FM25CL04, FM25040

SanDisk (www.sandisk.com)

SDMB-4, SDMB-8, SDMB-16, SDMB-32

SGS Thompson (us.st.com)

M35080, M93C86,  M93C76, M93C66, M93C56, M93C46, M93C06, M93S46, M93S56, M93S66, M95010, M95020, M95040, M95080, M95160, M95320, M95640, M95128, M95256, ST95010, ST95020, ST95040

Xicor (www.xicor.com )

X25020, X25040, X25160, X25F008, X25F016, X25F032, X25F064, X25F128

Digital Pots

Analog Devices (www.analog.com)

AD8400, AD8402, AD8403

Dallas (www.dalsemi.com )

DS1267, DS1844

Documentation

Open all | Close all