Continue to Site

Welcome to EDAboard.com

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.

[SOLVED] positive zero crossing

Status
Not open for further replies.

zouzanda

Member level 2
Joined
Feb 13, 2008
Messages
46
Helped
2
Reputation
4
Reaction score
3
Trophy points
1,288
Activity points
1,534
zero crossing.jpg



hello please i need a help from anyone.my problem is that i need to detect with a pic the zero crossing in yellow not in red.how can i do that??
thank you in advance
 

Configure INT0 to detect rising edge. In interrupt service routine write code for what you want to do when INT0IF bit is set.

Do you want ZCD circuit or code or both ?
 

Hi,

Zero cross is at both falling and rising sine signal.
If you use a comparator, then it's output is also a digital signal with falling and rising edge.

As suggested before you can trigger on the rising (or falling) edge only.

An external comparator can have the benefit, that it can handle negative input voltages.

Klaus
 

Also with a comparator circuit, you can add in some hysteresis so that you get good clean edges/pulse output on what could be slowly changing input signal. This helps to avoid missing or multiple counting the zero cross events.
 
  • Like
Reactions: Twisty

    Twisty

    Points: 2
    Helpful Answer Positive Rating
ok thank you guys .the problem is that i need to do all that using hardware not software my micro need to read only if it crossed the zero or not and i cannot use interrupt in that case.
anyone has an idea?
 

Hi,

Is it solved now, or not?

If not, then please draw a diagram with input signal and desired output signal.

Klaus
 

Yes, it can be done with pooling but only if your micro hasen't have to do any other thing.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top