Mikroelektronika MIKROE-442 데이터 시트

다운로드
페이지 726
304
mikoBasic PRO for dsPIC30/33 and PIC24
MikroElektronika
ECANxSelectTxBuffers
ECANxFilterDisable
Prototype
sub function ECANxSelectTxBuffers(dim txselect as word) as word
Description The function designates the ECAN module’s transmit buffers.
Parameters 
txselect
: transmit buffer select. By setting bits in the txselect lower byte corresponding buffers are 
enabled for transmition. The ECAN module supports up to 8 transmit buffers. Also, by clearing bits in 
the txselect lower byte corresponding buffers are enabled for reception.
Returns
0
 - if input parameter is valid 
0xFFFF
 - if input parameter is invalid 
Requires
The ECAN routines are supported only by MCUs with the ECAN module.
Microcontroller must be connected to ECAN transceiver which is connected to the ECAN bus.
The ECAN module must be initialized. See the ECANxInitialize routine.
Example
‘ Buffers 0 and 2 are enabled for transmition: 
ECAN1SelectTxBuffers(0x0005)
Notes
- ECAN library routine require you to specify the module you want to use. To select the desired ECAN 
module, simply change the letter 
x in the routine prototype for a number from 1 to 2
- Number of ECAN modules per MCU differs from chip to chip. Please, read the appropriate datasheet 
before utilizing this library. 
Prototype
sub procedure ECANxFilterDisable(dim fltdis as word)
Description The function disables receive filters.
Parameters 
fltdis
: filter disable selection parameter. Each bit corresponds to appropriate filter. By setting bit the 
corresponding filter is to be disabled. 
Returns
Nothing.
Requires
The ECAN routines are supported only by MCUs with the ECAN module.
Microcontroller must be connected to ECAN transceiver which is connected to the ECAN bus.
The ECAN module must be initialized. See the ECANxInitialize routine.
Example
‘ Filters 0, 4, 8, 12 are to be disabled: 
ECAN1FilterDisable(0x1111)
Notes
- ECAN library routine require you to specify the module you want to use. To select the desired ECAN 
module, simply change the letter 
x in the routine prototype for a number from 1 to 2
- Number of ECAN modules per MCU differs from chip to chip. Please, read the appropriate datasheet 
before utilizing this library.