MembersPage/Andrey (2007-03-19 13:05:24)

My page in Russian http://rus.vems.hu/punbb/index.php

Map sampling 1ms (best) or 2ms (good too).

map_processing() every event (best), or every rev (good too)

//sensor_filt[MAP] = 2 * map_samples_summ / map_samples_count;

void map_processing(void)

{

uint16_t t16;

uint32_t t32;

t16 = div_65535_x(map_samples_count);

t32 = mult16_16(map_samples_summ,t16);

sensor_filt[MAP] = t32 >> 15;

map_samples_summ = 0;

map_samples_count = 0;

}

has about 3us execute CPU time

vbatt, clt, mat with freq faster than 10Hz - waste of CPU time. I think 4Hz is enough.