PS_Fgen_FW  4da88f4073c1cc65ea45c3a652a2751e495e50db
Firmware for an Power Supply and Function Generator build from an ATX power supply
Loading...
Searching...
No Matches
DAC_MCP492x.h
Go to the documentation of this file.
1
7
8#ifndef DAC_MCP492x_H_
9#define DAC_MCP492x_H_
10
11#include "../Pins/Pins.h"
12#include "../Configuration.h"
13
14#define MCP492X_DACB 7
15#define MCP492X_BUFFERED 6
16#define MCP492X_GAIN_SELECT_SINGLE 5
17#define MCP492X_SHDN 4
18
19#define SELECT_MCP4922 SPI_SELECT_DDS
20#define DESELECT_MCP4922 SPI_DESELECT_DDS
21#define SELECT_MCP4921 SPI_SELECT_PS
22#define DESELECT_MCP4921 SPI_DESELECT_PS
23
28void MCP4921_DAC_Set(uint16_t dac_data);
29
35void MCP4921_Voltage_Set(float voltage);
36
42void MCP4922_DAC_Set(uint16_t dac_data, char channel_A_B);
43
50void MCP4922_Voltage_Set(float voltage, char channel_A_B);
51
52#endif /* DAC_MCP492x_H_ */
Containing different defines for device configuration.
void MCP4921_DAC_Set(uint16_t dac_data)
Set the DAC data value of the MCP4921 device.
Definition DAC_MCP492x.cpp:12
void MCP4922_DAC_Set(uint16_t dac_data, char channel_A_B)
Set the DAC data value of the MCP4922 device.
Definition DAC_MCP492x.cpp:46
void MCP4922_Voltage_Set(float voltage, char channel_A_B)
Set the voltage of the MCP4922 device.
Definition DAC_MCP492x.cpp:69
void MCP4921_Voltage_Set(float voltage)
Set the voltage of the MCP4921 device.
Definition DAC_MCP492x.cpp:31
Containing defines and functions for basic pin initialization and handling.