milan.rajik
Banned
![Advanced Member level 5](/styles/images/ranks/hlevel2.gif)
Why this is not working ?
The project is AC Light dimmer or Fan speed control. I am using PIC18F45K22 @ 4 MHz external Clock. I am using mikroC PRO PIC Compiler. Proteus 8.1 SP1 file is attached.
My calculations are like this
AC freq = 50 Hz
Period (T) = 1 / 50 = 0.02 sec
T / 2 = 0.01 sec = 10 ms
Minimum time after Zero Cross and before firing TRIAC is 2 ms.
Time span is 10ms - 2ms = 8 ms
I need 8 steps of increment and 8 steps of decrement.
1 ms is increased or decreased every step.
VDelay() function is used.
RB1 and RB2 buttons are using to decrement and increment the fan speed.
I have tested in Proteus and it is not working. I have not yet tested it in hardware. I have ordered the required parts for testing in hardware.
The project is AC Light dimmer or Fan speed control. I am using PIC18F45K22 @ 4 MHz external Clock. I am using mikroC PRO PIC Compiler. Proteus 8.1 SP1 file is attached.
My calculations are like this
AC freq = 50 Hz
Period (T) = 1 / 50 = 0.02 sec
T / 2 = 0.01 sec = 10 ms
Minimum time after Zero Cross and before firing TRIAC is 2 ms.
Time span is 10ms - 2ms = 8 ms
I need 8 steps of increment and 8 steps of decrement.
1 ms is increased or decreased every step.
VDelay() function is used.
RB1 and RB2 buttons are using to decrement and increment the fan speed.
I have tested in Proteus and it is not working. I have not yet tested it in hardware. I have ordered the required parts for testing in hardware.