Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
It is easy man, think about this... each leg of microcontroller has two protection diodes (zener), if the applied volatge is over 5 volt, let us say 220 Vrms, then the zener will cut it to 5 volt, and if it is -220Vrms, then the another zener will work in forward and make the volatge almost zero.
What you need is high impedence resistor (100Mohm) connected from the source (220Vrm) directly to the PIC interrupt leg, or you can use non-interruptual method just by scanning that pin if the frequency is not very haigh.
You need some protection and noise remover circuits.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.