I build an ECG with the PicoMite


Author Message
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 2171
Posted: 08:35am 04 Feb 2022      

  Volhout said  
P.P.S. did you look at the MATH commands, it these could be used to do the filtering faster ?


Interrupt service routines should really be kept as short as possible, even though you don't seem terribly pushed timing-wise a quick hit would be to define the constants a0 to b2 outside the ISR e.g.


Const a0 = 0.20657128
Const a1 = 0.21314257
Const a2 = 0.20657128
Const b1 = 0.16952595
Const b2 = 0.09581110

right at the top of your prog.
Edited 2022-02-04 18:37 by CaptainBoing