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.

filter code in microcontroller(8051)

Status
Not open for further replies.

Gaurav Agrawal

Newbie level 1
Joined
Aug 16, 2006
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,288
hi,

can anybody tell the embedded c code in 8051 microcontroller for filtering
20-400 Hz frequency range with sampling rate of 960 samples per second (16
bit data):?:

regards,

Gaurav
 

HI
There is a type of filter,called recursive filter.
reffer to signal & system books for more .
It is like it:
Y[n]=k0 x[n]+k1 Y[n-T]+k2 Y[n-2T]+...
it can be implememted easiely by UC.
 

Hi,
You can try to use IIR filter, it's easy to use in c.

because you only want the range of 20 to 400hz, you must calculate twice, low pass and high pass.

while impliment low pass filter, you can use
Yn=A0*Xn+B1*Yn-1,
where
Yn: current filtered value,
Xn: current sampled value,
Yn-1: previous filtered value,

and the A0 and B1 can be set by
A0=1-x
B1=x,
you can set x to 0.95, the larger the x, the lower the cut-off frequency.

for high pass filter, please search by yourself.
 

Hi i am working on ECG signal and i want to filter 50Hz noise from the ECG. Can anybody tell me it is better to perform it through micro-controller or through the use of notch filter.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top