![Acromag AcroPack AP441 Скачать руководство пользователя страница 29](http://html1.mh-extra.com/html/acromag/acropack-ap441/acropack-ap441_user-manual_2841145029.webp)
SERIES AP441 ACROPACK
USER
’S MANUAL
Acromag, Inc. Tel: 248-295-0310
- 27 -
http://www.acromag.com
- 27 -
www.acromag.com
If the module had been configured earlier, you would first read this
register to check the existing settings of debounce duration for the
other channels in Port A with the intent of preserving their
configuration by adjusting the value written above.
2.
Enable the debounce circuitry for channel 0 thru 3 inputs by setting
bits 0 thru 7 of the Debounce Control Register at BAR0 + 0x0000
0058. Write 000FH to the Debounce Control Register. If the module
had been configured earlier, you would first read this register to
check the existing settings of debounce enable for the other
channels in Port A with the intent of preserving their configuration
by adjusting the value written above.
3.
For our example, channels 0 thru 3 will be used to detect change-of-
state transitions. Write 000FH to the Event Type Register at BAR0 +
0x0000 0028 to set channels 0 thru 3 to change-of-state detection.
Note that the Event Polarity Registers are not used if change-of-state
type events are selected. If the module had been configured earlier,
you would first read this register to check the existing settings of
event type for the other channels in Port A with the intent of
preserving their configuration by adjusting the value written above.
4.
To enable event sensing for channels 0 thru 3, write 000FH to the
Event Enable Register at BAR0 + 0x0000 0018.
5.
(OPTIONAL) Write 01H to the Interrupt Enable Register to enable
interrupt request.
When a change-of-state is detected, an interrupt will be generated
(if the event sense detection circuitry has been enabled and
Interrupt Enable bit 0=1).
Note that the state of the inputs (on/off) can be determined by
reading the corresponding Input Registers. The event sense status
can only be determined by reading the corresponding Event
Pending/Clear Register. Remember, the event sense status is a flag
that is raised when a specific transition has occurred for a given
input point, while the state refers to its current level.
4.0 THEORY OF OPERATION
This section provides a description of the basic functionality of the circuitry
used on the board. Refer to the Block Diagram shown below as you review
this material.