Aug 7, 2012 #1 A amsbhole07 Member level 1 Joined Oct 28, 2010 Messages 35 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,286 Activity points 1,535 Hi, I am trying to built the light dimmer using Microcontroller and i am using MOC3011 and Triac BT136 and Zero crossing detector using Transistor BC847 Can any one give me the source code for Zero crossing detector in C
Hi, I am trying to built the light dimmer using Microcontroller and i am using MOC3011 and Triac BT136 and Zero crossing detector using Transistor BC847 Can any one give me the source code for Zero crossing detector in C
Aug 8, 2012 #2 kvtal Member level 3 Joined Sep 19, 2009 Messages 64 Helped 5 Reputation 10 Reaction score 5 Trophy points 1,288 Location india Activity points 1,583 Re: Light Dimmer Project im giving a sample code here here is some tutorial on PWM use this code to dimming the light as u can void delay_ms(unsigned int i) { unsigned int j; while(i-->0) { for(j=0;j<500;j++) { ; } } } void delay_micro(unsigned int i) { unsigned int s; for(s=0;s<i;s++) { ; } } void main() { unsigned int i; while(1) { for(i=0;i<200;i++) { led=0; delay_micro(i); led=1; delay_ms(20); } } }
Re: Light Dimmer Project im giving a sample code here here is some tutorial on PWM use this code to dimming the light as u can void delay_ms(unsigned int i) { unsigned int j; while(i-->0) { for(j=0;j<500;j++) { ; } } } void delay_micro(unsigned int i) { unsigned int s; for(s=0;s<i;s++) { ; } } void main() { unsigned int i; while(1) { for(i=0;i<200;i++) { led=0; delay_micro(i); led=1; delay_ms(20); } } }
Aug 8, 2012 #3 A amsbhole07 Member level 1 Joined Oct 28, 2010 Messages 35 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,286 Activity points 1,535 Re: Light Dimmer Project but without using PWM how we can write the COde
Aug 8, 2012 #4 kvtal Member level 3 Joined Sep 19, 2009 Messages 64 Helped 5 Reputation 10 Reaction score 5 Trophy points 1,288 Location india Activity points 1,583 Re: Light Dimmer Project in the above code i didn't use PWM,it is only with delays