A previous thread ==> http://www.picbasic.co.uk/forum/showthread.php?t=1026
Schematic + code (Dimmer.zip) ==> http://www.melabs.com/resources/samples.htm#submitted
Maybe not exactly what you need but should be enough to start
A previous thread ==> http://www.picbasic.co.uk/forum/showthread.php?t=1026
Schematic + code (Dimmer.zip) ==> http://www.melabs.com/resources/samples.htm#submitted
Maybe not exactly what you need but should be enough to start
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Sorry guys although I did a testing for a single channel version, I couldn't test the five channel one. I am posting the circuit and the code. I request the PIC gurus to have a look at the code and point the flaws. Please do read the notes.doc file for important information.
Regards
Sougata
Thank´s for the code Sougata. I will test it later. However I wrote some code myself and it works.I did not use Interupt´s.. There are some similaritys to what you wrote.
But As i say I will try out your code later
thanks
BG
BMI
Can someone help me?
I build the circuit from (Dimmer.zip) ==> http://www.melabs.com/resources/samples.htm#submitted,
and I have this problem:
If I press the increase button (<500ms) ,the lamp go on,full and if I press the decrease button, the lamp go off (normal).
If I try to decrease the intensity from full on, or increase the intensity from off state, the lamp it fllash fast without decreasing/increasing brightness, until the lamp go on or off.
On GP4 I have 50hz, and value at the pin GP2 while press the buttons, increment/decrement pulses by 500 uSec,until the maximum/minimum value, everything look ok.
Any Help?
Thanks!
If you mean the maxdelay value, yes.
But if you conect osciloscope and take a look at the pulses from the pic output and the 50Hz at the same time, you will see that the maxdelay value is only for the maximum brightness.
Looks like a bad signal level to me...
What is the voltage of your transformer?
What are your R3 and R4 value?
Try decrease R3 and post your results.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks