Digital Power Starter Kit 3 Firmware
dsPIC33C Buck Converter Voltage Mode Control Example

Conversion macros converting physical quantities of parameters into binary (integer) numbers for registers and variables. More...

+ Collaboration diagram for Conversion Macros:
#define CPU_TCY   (float)(1.0/CPU_FREQUENCY)
 Conversion macros of fundamental microcontroller device settings. More...
 
#define ADC_GRANULARITY   (float)(ADC_REFERENCE / pow(2.0, ADC_RESOLUTION))
 ADC granularity in [V/tick]. More...
 
#define ADC_VALUE_MAX   (uint16_t) (pow(2.0, ADC_RESOLUTION) - 1.0)
 
#define PWM_CLOCK_PERIOD   (float)(1.0/PWM_CLOCK_FREQUENCY)
 PWM Clock Period in [sec]. More...
 

Detailed Description

Conversion macros converting physical quantities of parameters into binary (integer) numbers for registers and variables.

Macro Definition Documentation

◆ ADC_GRANULARITY

#define ADC_GRANULARITY   (float)(ADC_REFERENCE / pow(2.0, ADC_RESOLUTION))

ADC granularity in [V/tick].

Definition at line 126 of file dpsk3_hwdescr.h.

◆ ADC_VALUE_MAX

#define ADC_VALUE_MAX   (uint16_t) (pow(2.0, ADC_RESOLUTION) - 1.0)

Definition at line 127 of file dpsk3_hwdescr.h.

◆ CPU_TCY

#define CPU_TCY   (float)(1.0/CPU_FREQUENCY)

Conversion macros of fundamental microcontroller device settings.

This section is used to convert device specific parameters like ADC reference and resolution, main execution clock frequency and peripheral time base settings, declared in physical quantities, into binary (integer) numbers to be written to variables and SFRs. Instruction period

Definition at line 125 of file dpsk3_hwdescr.h.

◆ PWM_CLOCK_PERIOD

#define PWM_CLOCK_PERIOD   (float)(1.0/PWM_CLOCK_FREQUENCY)

PWM Clock Period in [sec].

Definition at line 128 of file dpsk3_hwdescr.h.