61 lines
1.4 KiB
C
61 lines
1.4 KiB
C
|
/**
|
||
|
* @file config.h
|
||
|
* @author Jake G
|
||
|
* @date 15 June 2024
|
||
|
* @brief File contains the project configuration values
|
||
|
*
|
||
|
* This file contains the user changable parameters. Most the values are
|
||
|
* constants that will change the behavior of the system.
|
||
|
*
|
||
|
* For these changes to take affect you must recompile/rebuild the project
|
||
|
* after you have changed the values.
|
||
|
*/
|
||
|
|
||
|
#ifndef CONFIG_H
|
||
|
#define CONFIG_H
|
||
|
|
||
|
#include <stdint.h>
|
||
|
|
||
|
#define ADC_LOAD1 4
|
||
|
#define ADC_LOAD2 5
|
||
|
#define ADC_LOAD3 6
|
||
|
|
||
|
/**
|
||
|
* @brief Positive Zero Crossing Trigger Value
|
||
|
* The 10 bit value at which the program triggers the ISR to handle
|
||
|
* the zero crossing event.
|
||
|
*
|
||
|
* You can adjust this to change when the program will start the timer.
|
||
|
*/
|
||
|
const uint16_t TriggerValue = 512;
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @brief Triac Gate Pulse Quantity
|
||
|
*
|
||
|
* Contains the number of pulses that the micro-controller will send to the
|
||
|
* gates of the triac.
|
||
|
*
|
||
|
* This number should match the quantity of timings inside the pulse/duration
|
||
|
* array.
|
||
|
*/
|
||
|
const int GatePulsesQty = 5;
|
||
|
|
||
|
/**
|
||
|
* @brief Gate Pulses Array
|
||
|
*
|
||
|
* The gate pulses array holds the duration of pulses in microseconds for the
|
||
|
* triacs gates. The length of the array must be matched with the
|
||
|
* GatePulsesQuantity parameter.
|
||
|
*/
|
||
|
const uint16_t GatePulses[5] = {250, 500, 750, 1000, 1250};
|
||
|
|
||
|
/**
|
||
|
* @brief The time constant.
|
||
|
*/
|
||
|
const double Tau = 8250;
|
||
|
|
||
|
|
||
|
|
||
|
#endif //CONFIG_H
|