Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Page 1 of 5
rtfCANopen Version 2.0 -An implementation of CANopen for Real Time systemsAsier Illaro (asier.ip@euskalnet.net) Javier Portillo (jtppobej@bi.ehu.es)
INDEX
> Software of rtfCANopen 2.0 > Download area
http://www.disa.bi.ehu.es/gcis/spanish/proyectos/rtfCANopen/eng/rtfcanopen_2.htm
8/18/2011
rtfCANopen
Page 2 of 5
Updating Module
CANopen
Application
CAN BUS
Thick arrow: data flow Undulating arrow: interrupt Common arrow: module calls
The updating module is the same for all the nodes and provides CANopen compatibility in order to communicate and receive the code of the other modules via the CANopen network.
http://www.disa.bi.ehu.es/gcis/spanish/proyectos/rtfCANopen/eng/rtfcanopen_2.htm
8/18/2011
rtfCANopen
Page 3 of 5
1st transmit PDO parameter (1800h) 2nd transmit PDO parameter (1801h) 1st transmit PDO mapping (1A00h) 2nd transmit PDO mapping (1A01h) 2. 2 transmit PDO and 2 receive PDO are supported. The following parameters can be configured for each PDO: ID (11 bit). Transmission type (cyclic synchronous and acyclic synchronous). PDO mapping (8 objects at the most).
3. Switch configurable parameters: Node-ID (16 different ID) CAN bus speed (1000, 800, 500, 250, 125, 50, 20 and 10 Kbs) Microcontroller speed (4 or 8 MHz).
4. Resources that are used: Program memory (FLASH): 3Kword. Data memory (RAM): 70 bytes. EEPROM: 51 bytes.
5. New Application and CANopen modules can be downloaded to the microcontrollers via the CAN network. Microchips MPLAB IDE development environment generates INTEL HEX FORMAT which is used to download the code through the CAN network.
http://www.disa.bi.ehu.es/gcis/spanish/proyectos/rtfCANopen/eng/rtfcanopen_2.htm
8/18/2011
rtfCANopen
Page 4 of 5
COMMUNICATON FLASH
NMT
SDO
ISR
SPI
CAN BUS
COMMUNICATION This sub-module handles all the communication services needed to receive the code via the CANopen network. Accordingly, it is built in four sub-modules that provide these CANopen services. NMT: This sub-module implements the finite state machine that controls the operation of the node according to the CANopen standard. SDO: This sub-module handles SDO messages. These messages are used to send code via CANopen network as well as to configure the communication parameters of a node. ISR: This sub-module handles the CAN controller interrupts when a CAN message is received. In this case, ISR connects the interrupt with the appropriate sub-module, according to the message. SPI: This sub-module handles the access to the CAN controller and the access to the EEPROM memory. FLASH This module handles the Flash-programming functions needed to program CANopen and Application modules. It provides the functions that allow the transfer of the code received from RAM memory to FLASH memory. This process is shown in the following figure: RAM New CANopen CAN Bus FLASH Updating module
CPU
New Application CANopen Aplicacin
http://www.disa.bi.ehu.es/gcis/spanish/proyectos/rtfCANopen/eng/rtfcanopen_2.htm
8/18/2011
rtfCANopen
Page 5 of 5
This interface is built in several template files that provide all the information needed to design and update the CANopen and Application modules correctly. This template files are built in several suitable files used in Microchips MPLAB IDE for the generation of the HEX format files that contain the programmable code of each module: CANopen.asm Aplikazioa.asm AppSarrerak.asm CANSarrerak.asm Aplikazioa.lkr CANopen.lkr > go to index
DOWNLOAD AREA
> rtfCANopen V2.zip (binaries and source codes) > interface (Template files) > go to index
http://www.disa.bi.ehu.es/gcis/spanish/proyectos/rtfCANopen/eng/rtfcanopen_2.htm
8/18/2011