??? 11/29/06 12:27 Read: times |
#128659 - confusion.. Responding to: ???'s previous message |
//Apply filter for DC offset removal.
//y[n] =(0.996 * y[n-1]) + (0.996 * x[n]) - (0.996 * x[n-1]) //y[n] = (0.996 * prv fltrd ) + (0.996 * fresh adc) - (0.996 * old adc) Sample.PreviousFiltered = Sample.Filtered; // y[n] <- y[n-1] TempL = 255 * (long)Sample.Filtered; TempL = TempL >> 8; TempI = Sample.Fresh - Sample.Previous; TempL = TempL + (255 * (long)TempI;) Sample.Filtered = TempL; //-------------------------------------- can anybody tell me why (long) is written before sample.filtered even it is declared as long in global decaration. |
Topic | Author | Date |
filter for DC offset removal | 01/01/70 00:00 | |
I think its already done | 01/01/70 00:00 | |
Some hints | 01/01/70 00:00 | |
confusion.. | 01/01/70 00:00 | |
Do you need real time? | 01/01/70 00:00 | |
how this removes DC offset?![]() | 01/01/70 00:00 |