|
|
@ -20,18 +20,18 @@
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
// Set frequencys and general stuff
|
|
|
|
// Set frequencys and general stuff
|
|
|
|
uint16_t boost_frequency = 10000; // 10kHz frequency
|
|
|
|
uint16_t boost_frequency = 10000; // 10kHz frequency
|
|
|
|
uint16_t signalOutput_piezo_time = 200; // 200ms
|
|
|
|
uint16_t signalOutput_piezo_time = 150; // 150ms
|
|
|
|
uint16_t signalOutput_led_time = 200; // 200ms
|
|
|
|
uint16_t signalOutput_led_time = 150; // 150ms
|
|
|
|
|
|
|
|
|
|
|
|
// Used for execution-timing (with timer) [0 = disabled, >0 = nextTimerTick] (1 is next avaible execution)
|
|
|
|
// Used for execution-timing (with timer) [0: disabled, >0: nextTimerTick]
|
|
|
|
uint16_t boost_highVoltage_nextTick = 1; // Execute at start
|
|
|
|
uint16_t boost_highVoltage_nextTick = 1; // Begin to boost from start
|
|
|
|
uint16_t signalOutput_piezo_nextTick = 0;
|
|
|
|
uint16_t signalOutput_piezo_nextTick = 0;
|
|
|
|
uint16_t signalOutput_led_nextTick = 0;
|
|
|
|
uint16_t signalOutput_led_nextTick = 0;
|
|
|
|
|
|
|
|
|
|
|
|
// Prescaling of timer [timer-speed: cpu-clock / prescaler]
|
|
|
|
// Prescaling of timer [timer-speed: cpu-clock / prescaler]
|
|
|
|
// Modes: [1, 8, 64, 256, 1024]
|
|
|
|
// Modes: [1, 8, 64, 256, 1024]
|
|
|
|
uint16_t timer1_prescaler = 256;
|
|
|
|
uint16_t timer1_prescaler = 256;
|
|
|
|
uint16_t timer1_overflow_value = 65535; // For calculations
|
|
|
|
uint16_t timer1_overflow_value = 65535; // For calculations: 2^16 -1 (16-bit timer)
|
|
|
|
|
|
|
|
|
|
|
|
int main()
|
|
|
|
int main()
|
|
|
|
{
|
|
|
|
{
|
|
|
|