Can you provide code for operating relay with microcontroller? I have written the code for relay please check wither it is Suitable for relay operations or not .Please provide suitable code for Relay operations.
If that's real MCU code the relay isn't going to chatter, the I/O change is going to occur so fast it won't have a chance to turn the relay on. It's still better to code it like Mramos said suggested though.
If that's real MCU code the relay isn't going to chatter, the I/O change is going to occur so fast it won't have a chance to turn the relay on. It's still better to code it like Mramos said suggested though.
Pulsing a rulay is a pretty common way of saving power; you use a long pulse to turn it on, then <50% duty cycle to keep it on but only use half the amount of power.