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

Header file for the LTC1451 12-bit DAC. More...

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

Go to the source code of this file.

Data Structures

struct  LTC1451_t
 

Functions

LTC1451_t LTCDAC_InitCS (SPI_TypeDef *SPIx, GPIO_TypeDef *GPIOx, uint16_t GPIO_PIN)
 Initiliazes SPIx and the external LTC1451 DAC. Also sets up the sofware CS pin for SPIx.
 
void LTCDAC_SetOutputCS (LTC1451_t LTC_DAC, uint16_t outputVal)
 Sets the DAC's ouptut voltage (0-4.095v)
 

Detailed Description

Header file for the LTC1451 12-bit DAC.

Author
Devin Marx
Version
0.1
Date
2024-03-21

Function Documentation

◆ LTCDAC_InitCS()

LTC1451_t LTCDAC_InitCS ( SPI_TypeDef * SPIx,
GPIO_TypeDef * GPIOx,
uint16_t GPIO_PIN )

Initiliazes SPIx and the external LTC1451 DAC. Also sets up the sofware 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 DAC

◆ LTCDAC_SetOutputCS()

void LTCDAC_SetOutputCS ( LTC1451_t LTC_DAC,
uint16_t outputVal )

Sets the DAC's ouptut voltage (0-4.095v)

Parameters
LTC_DACStruct containing configuration data for the DAC
outputValVoltage to set on the output pin of the DAC