Download mikroPascal PRO - MikroElektronika
Transcript
mikroPascal PRO for dsPIC30/33 and PIC24 CANSPI Library The SPI module is available with a number of the dsPIC30/33 and PIC24 MCUs. The mikroPascal PRO for dsPIC30/33 and PIC24 provides a library (driver) for working with mikroElektronika’s CANSPI Add-on boards (with MCP2515 or MCP2510) via SPI interface. The CAN is a very robust protocol that has error detection and signalization, self?checking and fault confinement. Faulty CAN data and remote frames are re-transmitted automatically, similar to the Ethernet. Data transfer rates depend on distance. For example, 1 Mbit/s can be achieved at network lengths below 40m while 250 Kbit/s can be achieved at network lengths below 250m. The greater distance the lower maximum bitrate that can be achieved. The lowest bitrate defined by the standard is 200Kbit/s. Cables used are shielded twisted pairs. CAN supports two message formats: - Standard format, with 11 identifier bits and - Extended format, with 29 identifier bits In the mikroPascal PRO for dsPIC30/33 and PIC24, each routine of the CAN library has its own CANSPI counterpart with identical syntax. For more information on Controller Area Network, consult the CAN Library. Note that an effective communication speed depends on SPI and certainly is slower than “real” CAN. Important: - Consult the CAN standard about CAN bus termination resistance. - An effective CANSPI communication speed depends on SPI and certainly is slower than “real” CAN. - The library uses the SPI module for communication. User must initialize appropriate SPI module before using the CANSPI Library. - For MCUs with multiple SPI modules it is possible to initialize both of them and then switch by using the SPI_Set_ Active routine. - Number of SPI modules per MCU differs from chip to chip. Please, read the appropriate datasheet before utilizing this library. Library Dependency Tree 261 MikroElektronika
Related documents
mikroC PRO for dsPIC User Manual
RealView Compilation Tools Compiler User Guide
mikroPascal PRO for PIC32 User Manual
User manual - MikroElektronika
Data Sheet - MikroElektronika
Design of a Hands-on Course in Networked Control Systems
LM1095E - topwaydisplay.com
Manual - Digi-Key
mikroC PRO for PIC User Manual v100
mikroC PRO for AVR User`s Manual
mikroC for 8051 User Manual
mikroBasic PRO for AVR User Manual v100