2005-05-16 01:42 AM
2011-05-17 01:18 AM
Hi All,
Can any one explain how to compute numbers for MCOMP. I know these number relates to MTIM via the prescalar (MPRSR) but no matter which way I try I can not compute the same numbers that are in the 'Table 40. Step Frequency/Period Range (4MHz)'. TIA DaveE [ This message was edited by: DaveE on 13-05-2005 14:25 ]2011-05-17 01:18 AM
Hello,
with reference to figure 121 on the ST7MC datasheet, we can assume that: Fmtc = Fperiph = 4MHz (as you stated) So when the 'ratio' is equal to '0' the maximum frequency at the input of MTIM timer is equal to 2MHz (as there is a further block dividing by 2 the Fperiph frequency). Then, the maximum Step frequency is get through: 2MHz / 55h = 23529 Hz (that is, inverting, a minimum step period of 42.5us) where: 55h is the minimum value that MTIM timer can assume before the 'ratio' is automatically decremented by 1 The mimimum step frequency is: 2MHz/ FFh = 7843 Hz (that is, inverting, a maximum step period of 127.5us) These are the values assuming 'ratio' equal to 0. The other values in table can be got by assuming 'ratio' from 0 up to 15. Let me know if I was clear or not... Regards, Tanio2011-05-17 01:18 AM
That explains it perfectly. :)
Thanks DaveE