ryanelectronicengineering
Newbie
New to C, I have an int defined as LED_FLASH that has all bit's alternating by using LED_FLASH = ~LED_FLASH at a given rate coming from the timer ISR, what I need is to have three states of the LED. The circuit is 8 relays with a circuit breakers and a feedbacks to the uC in order to get the status of the output, LED needs to be ON if relay is ON and working normally, OFF if relay is OFF, and FLASH if no feedback is detected to indicate a fault condition (open breaker)... I am having trouble figuring out the logic of detecting a fault and get the led to change from ON to FLASH. I have all electronics working at the point where I can get relays to turn on/off, leds to turn on/off and read feedback status, registers are defined as int RELAY_DATA, int LED_DATA, and int FEEDBACK_DATA- How would one go about doing the logic? Thank you -Ryan