ADwin-Pro
Hardware, manual version 2.9, June 2006
175
Pro I: Signal Conditioning and Interface Modules
Pro-CAN-x Rev. A
ADwin
Interrupt / Event
A message object can be enabled to trigger an interrupt when a message
arrives. The interrupt output of the CAN controller is connected to the event
input of the processor. The processor reacts immediately to incoming mes-
sages without having to control the message input (polling).
You can enable the interrupts of several message objects. Which object has
caused the interrupt can be seen in the interrupt register (
5Fh
): It contains the
number of the message object that caused the interrupt. If the interrupt flag
(new message flag) is reset in the message object, the interrupt register will be
updated. If there is no interrupt the register is set to 0. If another interrupt
occurs during working with the first interrupt its source will be shown in the
interrupt register. An additional interrupt does not occur in this case.
Module revisions
The differences between the revisions is described below:
Programming
The module Pro-CAN is easily programmed with
ADbasic
instructions.
The instructions for the following ranges are in the include file
<ADPEXT.INC>
:
The instructions are described in the Pro software manual or the online help.
Revision
Output
date
Previous changes
A1
First version
A2
09/2003
New printed circuit board layout, bus termination
with DIP switches instead of jumpers.
Range
Instructions
Initialization of the CAN controller
INIT_CAN
Setting and reading of registers
SET_REG
,
GET_REG
Initialization of message objects
EN_RECEIVE
,
EN_TRANSMIT
Sending and receiving of data sets
TRANSMIT
,
READ_MSG
Enabling interrupts
EN_INTERRUPT
Setting the Baud rate
SET_CAN_BAUDRATE