saptagiriicafe
Newbie level 5
Sir, i am trying to detect a three phases lines i.e which phase is available or not by using pic16f676 .(three phases like R, Y & B Phases individually connected to pic16f676 micro controller pins RA0,RA1 & RA2 respectively) using series of 2.2M ohm 1/2 watt+5M ohm 1/4 watt to PIC pin RA0 and 10K ohm connected to ground & PIC RA0.
if R,Y & B phases (Three phase present) all are available RC0 pin connected(Three_phase) LED will Glow ON
if only R phase is available RC1 pin connected(Single_phase) LED will Glow ON
if R & B phases are available & Y phase failure RC2 pin connected (Two_phase)LED will Glow ON
i don't want digital conversion only phase is available OR not so how to detect these phases are available or not for C code ...
i am initialize like this
I have tried this concept but only NO_phase_LED = 1; LED Glow ON
finally i want detect AC mains either three/two/single phase available please let me know the program concept
thanking with u...
if R,Y & B phases (Three phase present) all are available RC0 pin connected(Three_phase) LED will Glow ON
if only R phase is available RC1 pin connected(Single_phase) LED will Glow ON
if R & B phases are available & Y phase failure RC2 pin connected (Two_phase)LED will Glow ON
i don't want digital conversion only phase is available OR not so how to detect these phases are available or not for C code ...
i am initialize like this
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 #define R_phase RA0 #define Y_phase RA1 #define B_phase RA2 #define Three_phase_LED RC0 #define Two_phase_LED RC1 #define Single_phase_LED RC2 #define NO_phase_LED RC3 void main() { CMCON=0x07; ANSEL=0x00; TRISA =0b001111; PORTA=0b001111; TRISC=0b000000; PORTC=0b00000; while(R_phase&&Y_phase&&B_phase) { Three_phase_LED = 1; ///RC0 pin connected(Three_phase) LED will Glow ON } while(R_phase&&B_phase) { Two_phase_LED = 1; ///RC1 pin connected(Two_phase) LED will Glow ON } while(R_phase||Y_phase||B_phase) { Single_phase_LED = 1; ///RC2 pin connected(Single_phase) LED will Glow ON } while(!R_phase&&!Y_phase&&!B_phase) { NO_phase_LED = 1; ///RC3 pin connected(No_phase) LED will Glow ON } }
I have tried this concept but only NO_phase_LED = 1; LED Glow ON
finally i want detect AC mains either three/two/single phase available please let me know the program concept
thanking with u...
Last edited by a moderator: