Digital Power Starter Kit 3 Firmware
dsPIC33C Buck Converter Voltage Mode Control Example
dev_buck_ptemp_dac.c
1 /*
2  * File: dev_buck_ptemp_dac.c
3  * Author: M91406
4  *
5  * Created on October 29, 2020, 10:31 AM
6  */
7 
8 #include "xc16_pral.h" // include peripehral register abstraction layer drivers
9 #include "dev_buck_ptemp_dac.h" // include peripheral register configuration values header
10 
11 
16 volatile struct P33C_DAC_MODULE_s buckDacModuleConfig =
17 {
18  .DacModuleCtrl1L.value = 0x0000,
19  .DacModuleCtrl2L.value = 0x0000,
20  .DacModuleCtrl2H.value = 0x0000
21 };
22 
23 
24 
30 {
32  .DACxCONH.value = REG_DACxCONH,
33  .DACxDATL.value = 0x0000,
34  .DACxDATH.value = 0x0000,
35  .SLPxCONL.value = REG_SLPxCONL,
36  .SLPxCONH.value = REG_SLPxCONH,
37  .SLPxDAT.value = 0x0000
38 };
39 
40 // end of file
REG_SLPxCONH
#define REG_SLPxCONH
SLPxCONH: DACx SLOPE CONTROL REGISTER LOW.
Definition: dev_buck_ptemp_dac.h:153
buckDacInstanceConfig
volatile struct P33C_DAC_INSTANCE_s buckDacInstanceConfig
DAC generator default configuration.
Definition: dev_buck_ptemp_dac.c:29
P33C_DAC_MODULE_s::DacModuleCtrl1L
union P33C_DAC_MODULE_s::@0 DacModuleCtrl1L
REG_DACxCONL
#define REG_DACxCONL
DACxCONL: DACx CONTROL REGISTER LOW.
Definition: dev_buck_ptemp_dac.h:72
P33C_DAC_MODULE_s
Abstracted set of Special Function Registers of a Digital-to-Analog Converter peripheral.
Definition: p33c_dac.h:60
REG_SLPxCONL
#define REG_SLPxCONL
SLPxCONL: DACx SLOPE CONTROL REGISTER LOW.
Definition: dev_buck_ptemp_dac.h:127
REG_DACxCONH
#define REG_DACxCONH
DACxCONH: DACx CONTROL REGISTER LOW.
Definition: dev_buck_ptemp_dac.h:98
P33C_DAC_INSTANCE_s
Definition: p33c_dac.h:94
P33C_DAC_INSTANCE_s::value
volatile uint16_t value
Definition: p33c_dac.h:97
P33C_DAC_MODULE_s::value
volatile uint16_t value
Definition: p33c_dac.h:63
P33C_DAC_INSTANCE_s::DACxCONL
union P33C_DAC_INSTANCE_s::@6 DACxCONL
buckDacModuleConfig
volatile struct P33C_DAC_MODULE_s buckDacModuleConfig
DAC module default configuration.
Definition: dev_buck_ptemp_dac.c:16