Advantech PCI-1682U Manual de usuario Pagina 57

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 104
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 56
51 PCI-1680U/1682U User Manual
Chapter 4 Software Requirements
4.4.3 Command_par
When users directly use DeviceIOControl interface of Windows Native API to call
drivers, this structure is needed.
If DeviceIOControl's parameter dwIoControlCode is CAN_IOCTL_COMMAND
(0x222540), this means command operation. If dwIoControlCode is
CAN_IOCTL_CONFIG (0x222544), it means configuration operation. (Please refer to
MSDN for related information about DeviceIOControl).
struct Command_par {
int cmd;
int target;
ULONG val1;
ULONG val2;
int error;
ULONG retval;
};
Note
1. The two modes of configuring Baud Rate are standard mode and custom mode.
Standard mode
The standard mode includes the recommended Baud Rate value. If the setting
value is 10, then the Baud Rate will be 10k.
Custom mode
If user need the baud rate is not in above table, user can use the custom mode
to set the custom baud rate.
The CAN port's baud rate is determine by CAN clock, BTR0 and BTR1 .
The Advantech CAN devices use 8MHZ clock and oscillator frequency is 16M,
The internal clock is divided by two from the oscillator frequency.
BTR0 and BTR1 Timing Registers are used for:
defining the bit-rate on the bus.
defining the sample point in a bit period (bit sample point).
defining the number of samples taken in a bit period.
we provide API function to set BTR0 and BTR1, The function will write the low 8
bits of setting value to BTR0 and high 8 bits of setting value to BTR1 of CAN
device register.
Target value BTR0 BTR1 Setting value
10K 0x31 0x1c 10
20K 0x18 0x1c 20
50K 0x09 0x1c 50
100K 0x04 0x1c 100
125K 0x03 0x1c 125
250K 0x01 0x1c 250
500K 0x00 0x1c 500
800K 0x00 0x16 800
1000K 0x00 0x14 1000
Vista de pagina 56
1 2 ... 52 53 54 55 56 57 58 59 60 61 62 ... 103 104

Comentarios a estos manuales

Sin comentarios