changed to do ZCD inside the main loop.

This commit is contained in:
jakeg00dwin 2024-09-24 16:56:03 -07:00
parent f55dd8165a
commit 156dfb6e09
1 changed files with 3 additions and 2 deletions

View File

@ -48,10 +48,11 @@ int main(int argc, char **argv)
//The G1 pin is low at this point. //The G1 pin is low at this point.
_delay_ms(2500); _delay_ms(2500);
//EnOut_SetAllHigh(); //Sets G1 High
Enable_SetPinsHigh(); Enable_SetPinsHigh();
ZCD_Poll();
while(true){ while(true){
ZCD_Poll();
//Enable pins are enabled(set high) if the ADCLOAD value is valid. //Enable pins are enabled(set high) if the ADCLOAD value is valid.
_delay_us(Tau); _delay_us(Tau);
Load_HandleLoadPortA(ADC_LOAD1, EN1); Load_HandleLoadPortA(ADC_LOAD1, EN1);