EasySync USB2-F-7101 Manual de usuario Pagina 7

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 30
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 6
Document Reference No.: ES_000010
USB2-F-7x01 Programming Guide
Version 1.01
Clearance No.: ES# 27
©2009-2010 EasySync Ltd. 7
2.2.3 canplus_Open
Summary
Open a channel to the USB2-F-7x01.
Definition
CANHANDLE canplus_Open( LPCSTR szID, LPCSTR szBitrate, LPCSTR acceptance_code, LPCSTR
acceptance_mask, unsigned long flags );
Parameters
szID USB2-F-7x01 serial number
szBitrate 10 = 10Kbps
20 = 20Kbps
50 = 50Kbps
100 = 100Kbps
250 = 250Kbps
500 = 500Kbps
800 = 800Kbps
1000 = 1000Kbps
aabbcc = custom bit rate
aa = BRGCON1 register of Microchip PIC 18F2680
bb = BRGCON2 register of Microchip PIC 18F2680
cc = BRGCON3 register of Microchip PIC 18F2680
The USB2-F-7x01 utilizes a 24MHz clock for the PIC 18F2680. Use this
value when referring to the PIC datasheet if a custom transmission rate
different from the eight pre-defined rates is required.
acceptance_code 11-bit (0x000 to 0x7FF) or 29-bit (0x00000000 to 0x1FFFFFFF) code
used in filtering specific or ranges of CAN messages. Used in conjunction
with the acceptance mask. Note: When referring to the PIC datasheets,
Acceptance Code is synonymous with Acceptance Filter.
acceptance_mask 11-bit (0x000 to 0x7FF) or 29-bit (0x00000000 to 0x1FFFFFFF) code used
in filtering specific or ranges of CAN messages. Used in conjunction with
the acceptance code.
flags CANPLUS_FLAG_TIMESTAMP
True = The timestamp function will be enabled by the USB2-F-7x01.
False = Timestamps will be determined by the device driver.
Remarks
If multiple USB2-F-7x01 adapters exist in a system, user must call canplus_getFirstAdapter and
canplus_getNextAdapter to get serial numbers of the connected adapters. The serial number
must be passed to canplus_Open in szID to open a specific device. If szID == NULL, the first
USB2-F-7x01 device will be opened.
Only one open command will be successful for a single device. At this point multiple channels to a
single physical device are not supported.
Any argument to this API may be set to NULL to use default value of the field. By default a CAN
channel is opened to accept all standard and extended CAN frames at 1Mbps bit rate.
Default timeouts for the underlying FTDI D2XX FT_Read and FT_Write are set to 1sec.
Vista de pagina 6
1 2 3 4 5 6 7 8 9 10 11 12 ... 29 30

Comentarios a estos manuales

Sin comentarios