Jäger ADwin-Gold-USB Manual page 41

Hide thumbs Also See for ADwin-Gold-USB:
Table of Contents

Advertisement

ADwin
An arriving message overwrites the old data in the message object, which will
be definitely lost. Therefore pay attention to reading out the data faster than you
are receiving them. A data loss is indicated by a flag.
The message object 15 has an additional buffer, so that 2 messages can be
stored there.
The allocation of an arriving message to a message object is automatically con-
trolled by comparing its identifiers. The global mask (CAN registers 6...7 or
6...9) controls this comparison as follows:
– The identifier of the message is bit by bit compared to the identifier of the
message object. If the relevant bits are identical, the message is trans-
ferred to the message object. Not relevant bits are not compared to each
other, that is, the message is transferred to the object (if it depends on
this bit).
– Relevant bits are set in the global mask.
With the global mask a message object is used for receiving messages with dif-
ferent identifiers (ID). The following example shows the assignment of the
message IDs 1...4 to the message object IDs 1...4, when all bits of the global
mask are set, except the two least-significant bits (if you have an 11-bit identifier
it is 11111111100b).
Message ID
1 (...001b)
2 (...010b)
3 (...011b)
4 (...100b)
x: Message is admitted
0: Message is not admitted
In this example the comparison of bit 2 is responsible for the assignment of the
messages, because the bits 3...10 of the compared identifiers are identical (=
0) and the bits 0 and 1 are not compared, because they are set to zero in the
global mask (= not relevant).
Setting the bus frequency
The CAN bus frequency depends on the configuration of the controller.
The initialization with
INIT_CAN
CAN bus frequency of 1 MHz. If the CAN bus is to operate with a different fre-
quency, the values in the "Bit Timing Register 0" (BTR0, address 3Fh) and in
the "Bit Timing Register 1" (BTR1, address 4Fh) have to be changed. Just use
the instruction
SET_CAN_BAUDRATE
cies.
With low speed CAN the maximum bus frequency is 125kBit/s.
In some special cases it may be better to select configurations other than those
set with the instruction mentioned above. For this purpose specified registers
have to be set with the instruction POKE. The structure of the register is
described below.
Bit Timing Register 0
Bits
7...6
Sub-Reg.
SJW
ADwin-Gold USB / ENET, manual version 3.8, October 2005
ID of the message object
1
2
...001b
...010b
x
x
x
x
x
x
0
0
configures the controller automatically to a
for setting a large quantity of bus frequen-
Bit Timing Register 1
(BTR0)
5...0
7
BRP
SPL
3
4
...011b
...100b
x
0
x
0
x
0
0
x
(BTR1)
6...4
3...0
TSEG2 TSEG1
CAN add-on
Assigning messages
Global mask
Bus frequency for
special cases
37

Advertisement

Table of Contents
loading

This manual is also suitable for:

Adwin-gold-enet

Table of Contents