Updated and tested that ZCD and the load functions are correctly working.

This commit is contained in:
jakeg00dwin 2024-09-05 13:44:41 -07:00
parent 6ba36f1515
commit df42c168c4
1 changed files with 7 additions and 6 deletions

View File

@ -24,6 +24,7 @@
#include "Relays.h"
#include "SuperLoop.h"
#include "config.h"
#include "load.h"
#include "timer.h"
#include "zero_cross_detection.h"
#include <avr/cpufunc.h> /* Required header file */
@ -114,15 +115,15 @@ int main(int argc, char **argv) {
// TriacOut_PulsePins(GatePulses[i]);
}
Relay_Enable(&ac_relay);
_delay_ms(500);
Relay_Disable(&ac_relay);
Relay_Enable(&ac_relay);
_delay_ms(500);
Relay_Disable(&ac_relay);
while (true) {
// Enable pins are enabled(set high) if the ADCLOAD value is valid.
// Load_HandleLoadPortA(ADC_LOAD1, EN1);
// Load_HandleLoadPortB(ADC_LOAD2, EN2);
// Load_HandleLoadPortB(ADC_LOAD3, EN3);
Load_HandleLoadPortA(ADC_LOAD1, RELAY0_ENPIN);
Load_HandleLoadPortB(ADC_LOAD2, RELAY1_ENPIN);
Load_HandleLoadPortB(ADC_LOAD3, RELAY2_ENPIN);
}
// Setup for Infinite Loop