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.
Any zero crossing detector generates pulses at the output I belive.
If so the output will be connected to a timer input or external interrupt pin of the micro.
If it is connected to timer input you have run in capture mode to count the number of pulses. Here timer register is loaded with the time base, the cap register will have the count of pulses in that time which can be read in over flow interrupt.
If it is connected to external interrupt, you have to run a timer for certain time period say 1 sec, and in external interrupt you can increment the count of the pulses. In the timer over flow interrupt the count is the number of pulses in 1 sec.
Hmmmm, you are rounding on the same point. The most important thing here is using external interrupt pin for this purpose, either postive edge or negative edge.
When the square pulses pulsed on that pin, it makes interrupt then you can count each interrupt action which is equal to one pulse.
I suggest you to use CCS from www.ccsinfo.com
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.