Instructions

245 C-Control Pro IDE
© 2013 Conrad Electronic
Parameter
mob MOb Number(0-14)
ID Identifier
maskID Identifier Mask
flag Operation parameter for the Message Object (MOb)
flag Parameter:
Value (Hex)
Definition
Description
01
CAN_RECV
Messages are received on this MOb
02
CAN_RTR
The Remote Trigger Bit is set
04
CAN_EXTID
The CAN Message has a 29-Bit ID (V2.0 part B)
08
CAN_REPL
Automatic Reply is initialized
10
CAN_IGN_RTR
RTR is not set in ID Mask
20
CAN_IGN_EXTID
IDEMSK is not set in ID Mask
40
CAN_SEND
Messages are sent on this MOb
5.6 Clock
Mega
The internal software clock is clocked by the 10ms interrupt of Timer2. Time and date can be set and then
continue to run independently. Leap years are taken into account. Depending on the Quartz inaccuracy the
error is between 4-6 seconds per day. A correction factor in 10ms ticks can be applied, that is added every
hour to the internal counter.
Example: If you have a deviation of 9.5 sec for 2 days, then you have to correct a deviation of 9.5 / (2 * 24) =
0.197 sec. This corresponds to a correction factor of 20, if the software clock goes in advance, or -20 else.
When Timer 2 off, or used for other purposes, the internal software clock is not functional.
AVR32Bit
Inside the AVR32Bit Unit the builtin AVR32 Real Time Clock module is used for the clock functions.
In addition, the external 32khz crystal offers here a far more accuracy than the clock oscillator of the
C-Control Pro Mega Units. Therefore, the correction factor remains unused in the C-Control Pro
AVR32Bit.
5.6.1 Clock_GetVal
Clock Functions
Syntax
byte Clock_GetVal(byte indx);
Sub Clock_GetVal(indx As Byte) As Byte