首先假设 频率: f 分频系数: n 间隔定时: s 周期: T 模模式最大值: N 因为 T = 1 / f 所以 s = ( n / f ) * N = n * N / f 由此可得 计算模模式最大值公式:N = ( s * f ) / n 带入数据,计算试试 频率 32M = 32*10^6 分频系数 8 间隔定时 0.01s N = (0.01 * 32*10^6) / 8 = 40000 但是板子里面是从0开始算了的4000个数 所以是 0 ~ 39999 所以模模式最…
上一节讲了16位定时器1,本节讲8位定时器3和定时器4! 1.综述 Timer 3 and Timer 4 are two 8-bit timers(8位定时器). Each timer has two independent capture/compare channels(独立的捕获/比较通道),each using one I/O pin per channel. Features: · Two capture/compare channels· Set, clear or toggle…