Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Question of oeration of CAN BUS

Status
Not open for further replies.

luckyvictor

Member level 4
Joined
Dec 1, 2009
Messages
78
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,903
Hi All

I am very new to this technology, and after reading documents from Audi, Bosch and Wikipedia, I have the following questions:

Hardware
2 node on a 2 wires BUS, 1 wire for CAN High and the other for low, both end are terminated.

Quesitons:
1. Both are required to transmit and receive, do I have to set both of their statuses respectively during operation?

2. Let say unfortunately, one node is sending and the other is also sending. From the philosophy of CAN, I know that one message will be overwritten by the one which has a higher priority, e.g the smaller numerical number identifier. It is however both nodes are doing this in a periodic manner, for example, 100ms, so does it mean the one which has lower priority will NEVER be able to send out its message please? as they both are sending messages periodically.

Thanks
Victor
 

Hi Victor,

1. I'm not so sure what you are meaning by "status"?
2. If their clocks are perfectly synced, then the CAN node with the lower priority ( higher ID) will always loose in the arbitration process, however usually when a node lose the arbitration, it will attempt to resend the frame once the current CAN frame has been received.
 

Status here means whether the node is now in listening mode or transmitting mode.
 

what type of CAN module are you using?
I don't think there is a special mode for transmitting, usually it is enough to send information to the CAN module and it will forward it to the CAN bus.
 

To be honest, I have no idea what CAN module is being used in the produce I am working on, hopefully I can find out.

This actually allows me to ask the following questions:

For example, there are two nodes in the network, Node A can send 2 message, for instance, ID 100 ID 101, whereas Node B can send another two messages ID 200, ID 201

1. Let say I program Node A to send message with ID 100 every 100ms, do I need to program Node B to receive this message? and how?

2. Let say I would like Node A to receive message ID 200 from Node B, do I program Node A or Node B or both Node A and B please? and roughly how? Just need the idea.

Thanks
 

You do not need to program a CAN node for receive. Think of it as a smart UART, it is always in receive mode when you sent a CAN frame to the node, it will start to send it to the CAN BUS. If someone else is trying to transmit at the same time, then there will be a contest between them where the winner will get the chance to send the message and the looser will switch back to receive mode to receive the message.
It is difficult for me to answer your second question, since I do not know what type of CAN module you have, Whether it is a micro-controller interface (so you need to configure the CAN registers) or maybe a USB module, where it usually comes with a PC software. Generally speaking, the CAN is pretty straight forward where you simply have to place the data you need to transmit in the transmit registers and start to transmit.
The ID of the CAN frames is used to; A) give priority to the frame. B) you can set a filter at the receiving CAN node so it will know to accept specific IDs, but at default it is usually set to receive all IDs, so no programming is required.
 

So in general CAN concept, if a node would like to have information from another node, should it be requested and may send only upon request? or that information should be programmed to send out periodically?
 

The information should be send out periodically.
 

The information should be send out periodically.

so that also means a node can not request information, a data is only sent if it is designed to share with other nodes. Am i correct?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top