Tip:
Highlight text to annotate it
X
The controller area network or CAN has been widely used in automotive
applications for many years
but has recently become popular non automotive applications
such as machine control
home appliances and building automation
What makes CAN so attractive?
Well let's take a look at the various types of serial communication channels
that are available to embedded developers.
First there are synchronous transmissions such as SPI and I2C
that are capable of high data rates over short distances
making them ideal for on-the-board communications
for off-the-board communications
asynchronous transmission such as
UART, LIN
CAN
USB
and Ethernet are all available
UART and LIN are good low-cost options but have poor noise immunity
and while USB and Ethernet have good noise immunity and high data rates
they're also expensive!
When cost is a factor
and noise immunity is important
CAN is a great fit!
Let's take a look at a security system application example.
The system contains a main control unit
zone sensor, door sensor, alarm
and keypad.
What type of communication is best for this network?
USB and Ethernet are clearly overkill for this application and so they can be
removed for cost reasons.
If point-to-point or single master bus topologies were used
the wiring would become convoluted, and time-consuming
this rules out
SPI, UART and LIN
having a multi-master bus topology simplifies the wiring needed
and so leaves I2C and CAN for consideration.
One of the key differences between I2C and CAN is noise immunity
CAN uses differential signaling and has built-in error detection,
giving it excellent noise immunity
and since noise immunity is important in security systems
that makes CAN
the best communication choice for this network
Another benefit of CAN
is its ability to do real-time control
CAN's ID field can be split into user protocol fields such as Group Priority
Function, and Device Address
this means that in our security system example
when the door sensor detects an open door, it can send that message to
the main control unit with critical priority thus taking precedence
over other messages on the bus
the main control unit can then send a message to the alarm also with critical
priority and to the keypad with lower priority.
The ability to assign different priority levels on a CAN network enhances
real-time system control.
So now you want to use CAN, and the question is how do you pick one?
There are three different types of CAN controller implementations
in a basic CAN implementation there two to three mailboxes and much of the
filtering needs to be done in software
all of which results in high loading on the CPU
Full CAN implementations
include sixteen to thirty-two mailboxes
and integrate hardware filtering
this reduces CPU loading
and to even further reduce CPU loading
full CAN + FIFO implimentations
integrate FIFO buffers
for efficent processing of back-to-back messages.
With thirty-two mailboxes
eight acceptance masks and optional FIFO mode
RX CAN is a full CAN plus FIFO implementation
ensuring autonomous CAN processing
with data rates up to one megabit per second and minimal CPU loading.
To simplify system integration RX CAN includes special test modes
for listen only and loopback
Renesas provides free CAN middleware
with an easy to use API
CAN support is also available from the extensive third party
RX eco-system
With RX CAN it's easy to create a scalable
realtime network which has excellent noise immunity making it suitable for
applications where safety is an important factor.
To get started with your CAN development
visit our website where you'll find a handy product selector
which will help you determine the RX device best suited for your application
and to learn more about how to implement CAN using an RX microcontroller
Renesas Interactive provides a wealth of informative courses. �