Hey Now-started
First of all, this code is very similar to what you can use in PBPro.
Now to your specific queries.
what the code is supposed to do is
1. Get triggered by the external interrupt pin on a mains zero crossing
2. When this happens, the TMR0 timer is loaded with the delay time to fire the triac. Think of this as a phase lag triggering like the triac dimmer you use in your lamps.
3. The 67 and 155 are limiting values for the delay time, so when you increase the value it should not increase beyond 155 and when you decrease it should not go below 67. If these conditions are not met, you will have weird behaviour on the triac dimmer
4. The load_value is the delay time I talk of here. The +/-8 is the step for the dimmer value
I hope my explanation will turn on more light bulbs for you
Hope you can put a name on your alias Now_started![]()
Bookmarks