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.

zero crossing algorithm in microcontroller PIC or ATmega or 8051

Status
Not open for further replies.

shahbaz.ele

Advanced Member level 1
Joined
Aug 12, 2008
Messages
454
Helped
72
Reputation
146
Reaction score
73
Trophy points
1,308
Location
Islamabad, Pakistan
Activity points
3,669
dear all
can anyone suggest me that zero crossing algo be implemented in microcontroller for data length 500 points.
i want to count the zero crossing during this time.
 

Since Zero crossings are bidirectional with no hysteresis, unless specified.
You only need to mask the "sign bit" to look at data for zero crossings.

- Initialize counter.
- Initialize data
- For N = 1 to 500 Points
- Initial data point = your Bias (or DC) slicer level reference of data for "zero crossing".
- In this case if data is just Sign bit you use either 0 or 1, otherwise Max/min/2 or any preferred "slicer level."
- Load two consecutive data reads and EX OR output
- If XOR result >0 increment counter
- Loop


:razz::shock:
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top