ACDC Senior Project v1.0.0
Senior Project for Textron Aviation
Loading...
Searching...
No Matches
ACDC_LTC1298_ADC.h File Reference

Header file for the LTC1298 12-bit ADC. More...

#include "stm32f1xx.h"
#include "ACDC_stdint.h"

Go to the source code of this file.

Data Structures

struct  LTC1298_t
 

Functions

LTC1298_t LTCADC_InitCS (SPI_TypeDef *SPIx, GPIO_TypeDef *GPIOx, uint16_t GPIO_PIN)
 Initiliazes SPIx and the external LTC1298IS8 ADC. Also sets up the software CS pin for SPIx.
 
uint16_t LTCADC_ReadCH0CS (LTC1298_t LTC_ADC)
 Reads the current ADC value on channel 0 (Software CS)
 
uint16_t LTCADC_ReadCH1CS (LTC1298_t LTC_ADC)
 Reads the current ADC value on channel 1 (SoftwareCS)
 

Detailed Description

Header file for the LTC1298 12-bit ADC.

Author
Devin Marx
Version
0.1
Date
2024-02-21

Function Documentation

◆ LTCADC_InitCS()

LTC1298_t LTCADC_InitCS ( SPI_TypeDef * SPIx,
GPIO_TypeDef * GPIOx,
uint16_t GPIO_PIN )

Initiliazes SPIx and the external LTC1298IS8 ADC. Also sets up the software CS pin for SPIx.

Parameters
SPIxSPI Peripheral (Ex. SPI1 or SPI2)
GPIOxGPIO Port for the chip select pin (Ex. GPIOA, GPIOB, ...)
GPIO_PINDesired chip select pin on port GPIOx (Ex. GPIO_PIN_0, GPIO_PIN_1, ...)
Returns
Struct containing all necessary data for the ADC

◆ LTCADC_ReadCH0CS()

uint16_t LTCADC_ReadCH0CS ( LTC1298_t LTC_ADC)

Reads the current ADC value on channel 0 (Software CS)

Parameters
LTC_ADCStruct containing configuration data for the ADC
Returns
12-bits of data representing the ADC's input on channel 0

◆ LTCADC_ReadCH1CS()

uint16_t LTCADC_ReadCH1CS ( LTC1298_t LTC_ADC)

Reads the current ADC value on channel 1 (SoftwareCS)

Parameters
LTC_ADCStruct containing configuration data for the ADC
Returns
12-bits of data representing the ADC's input on channel 1