User Tools

Site Tools

한국어

moacon:countprescaler:index

countPrescaler

void countPrescaler (u8 cntChannel, u16 prescaleValue)

cntChannel : Channel number (0 or 1 for DP-HCNT)
prescaleValue: 0 ~ 65,535

Scales the counter to support a higher count by dividing the count by a prescale value, prescaleValue. The default prescale value is 0, which is division by 1 (i.e. each pulse will increment/decrement the counter by 1). Therefore, the divisor is equal to prescaleValue + 1.

If prescaleValue is 5, the divisor would then be 5+1=6 meaning every 6 pulses will increment/decrement the counter by 1.

countPrescaler initializes the counter to 0.

go MOACON home

moacon/countprescaler/index.txt · Last modified: 2016/04/14 11:07 (external edit)