Page | 30
MINT – IO
REF NO: m25A/om/101
Issue No: 11
4.1.5.4 Counter Capture:
To capture a counter a BIT value must be written to the corresponding
channel number in the Counter Capture Register 40065.
For example: Writing 1 to BIT1 of Register 40065 results in Counter 1 value
being captured to Counter Capture 1. Writing 1 to BIT2 of Register 40065
results in Counter 2 value being captured to Counter Capture 2. Writing 1 to
BIT3 of Register 40065 results in Counter 3 value being captured to Counter
Capture 3. etc.
4.1.5.5 Capture Counter Registers:
Capture counter registers display counter values which are stored in non
volatile memory.
4.1.5.6 Counter Zero:
Initial value of counter during power ON condition is controlled by counter
zero registers. To ensure that a counter initial value is zero, a 1 must be
written to the corresponding bit position in the Capture Zero Register 40070
otherwise initial value of counter is value of capture counter registers which is
stored in non volatile memory.
For example:
Writing 1 to BIT1 of Register 40070 results in Counter 1 starts
counting from zero value on power ON module.
Writing 1 to BIT2 of Register 40070 results in Counter 2 starts counting from
zero value on power ON module, etc.
Writing 0 to respective BIT position means particular counter starting from
captured value.
The value in the Capture Zero Register 40070 is permanently stored in
Memory and only has to be configured once.
Flow chart of Counter function:
Is Counter
Zero register
(
40070
) written
‘0’?
IS capture counter BIT
value one is written to
the corresponding
channel number in the
Counter Capture
Register 40065.
Input signal
level
change ?
POR
Counter register initial value is
copied from capture counter
registers i.e. counter 1 register
(40001 &2) is copied value from
capture counter register (40033 &
40034)
Counter register initial
value is zero. i.e. counter
registers for channel one
(40001 &2) is zero on
power ON.
Counter register value
increment or Decrement
by 1 accordingly its mode
Current value of Counter
registers are stored in
non-volatile memory at
Capture counter
registers.