Hello All,
I am planning to build a Lamp Dimmer as mentioned in the PICREF-4 design. I would like some help in code for this project using PICBASIC PRO.
Thank you in advance.
Hello All,
I am planning to build a Lamp Dimmer as mentioned in the PICREF-4 design. I would like some help in code for this project using PICBASIC PRO.
Thank you in advance.
hi,
For the benefit of all here's the link for Microchip APP NOTE PICREF-4
http://ww1.microchip.com/downloads/e...tes/40171a.pdf
which part of the code you need to know??? On which frequency your AC line work... not too important but...
IMO, i prefer using other circuit design for that... no transformer AAAAARRRRGH! Safer to use cheap transformer+opto isolator between PIC and TRIAC. But i always use the safer method... not the cheaper one. I may be wrong here but... i'm still on the market and alive![]()
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Hello Steve,
I am looking for a code using PICBASIC Pro, It would be much easier to understand and modify.
AC - 230V @ 50 Hz.
I would then be interested in coupling this circuit with some IR chip set and making it totally remote operated. The IR would be ready made solution and not integrated withing the PIC itself.
regards
O.k
all you need to know @50Hz
Period : 20 ms
1/2 period :10 ms
i'll prefer to detect begining of each cycle using the appended circuit...
You must detect begining of cycle, then activate output to TRIAC for a maximum delay of 10ms including when your PIC is detecting the begining of the cycle. Let's say your PIC is detecting the cycle after 1ms of the begining, you must wait a maximum of 9 ms. Can be intelligent to use a PIC who have internal voltage comparator here.
try the following code as a begining.
Code:'Using PIC16F628 @ __config _INTRC_OSC_NOCLKOUT & _WDT_ON & _PWRTE_ON & _MCLRE_ON & _LVP_OFF TRISB=%00000001 BeginingCycle var PORTB.0 OutputToTriac var PORTB.1 delay var byte Hold var word while BeginingCycle wend start: For delay=0 to 8 for Hold=1 to 100 while BeginingCycle=0 wend OutputToTriac=1 Pause delay OutPutToTriac=0 While BeginingCycle Wend Next next goto start
Last edited by mister_e; - 20th December 2004 at 22:12.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Hi,
I do one code based on a PIC12F675. Wiring is the same as in the PICREF. But i choose a full wave rectify AC for input to PIC.
Hope this help you.
have fun!!!
regards
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Hi,
I am trying to control an AC lamp with 230V 50Hz using PIC12F1572. Is it possible with this MCU??. Please help me in understanding the working of the circuit and program flow. I am using MPLAB X with xC8 compiler.
The Data sheet of PIC12F1572 is attached in the link.
http://ww1.microchip.com/downloads/e.../40001723D.pdf
Thanks in Advance
If i use the same PIC12F1572 with PicBasic is it possible?
Thanks a lot steve. I shall try and get back to you in a couple of days.
Just enjoying the HAMFEST hosted by some local HAM club here in India.
I shall post my developments soon.
VU2UPX
Bookmarks