CAN without transceivers

Hi all.

I've been working with CAN for years and very good it is too. I currently have a project where we need to implement two micros on one PCB and implementing CAN between them seems the easiest way forward.

As far as I know all I need is to cross connect the Tx and Rx lines and everyting should work OK, no need for transceivers as it's a short connection and only requires 2 devices.

Does anyone have any reasons why this is not a good idea maybe from similar experiences?

Dave.

Reply to
DaveN
Loading thread data ...

Hi all.

I've been working with CAN for a few years and very good it is too. I currently have a project where we need to implement two micros on one PCB and implementing CAN between them seems the easiest way for them to communicate.

As far as I know all I need is to cross connect the Tx and Rx lines and everyting should work OK, no need for transceivers as it's a short connection and only requires 2 devices.

Does anyone have any reasons why this is not a good idea maybe from similar experiences?

Dave.

Reply to
DaveN

That's not going to work - each CAN controller also needs to be able to "hear" itself on the bus. But you can put together a simple bus with the help of a couple of diodes and a resistor. Connect each controller's Rx pin together with a single "Can" line, which is pulled up with a resistor (say, 4k7). Connect each Tx pin to the "Can" line with a diode, so that the Tx pin can pull the line low but only the resistor can pull it high again. I haven't tried this myself, but I believe it should work.

Reply to
David Brown

It depends on the controller type - for example, SJA1000 has bus drivers that can be cross-connected to another SJA1000 - on the other side, most microcontrollers have only one TX and one RX line and that won't be sufficient - CAN devices must be able to "hear" what's going on on the TX side of the bus, so some simple logic will have to be implemented...

- Dejan

Reply to
Dejan

The HW works. I think you can found about it by CiA. But the low level on the bus is bigger as GND (Vf diode). You must test the PCB communication by EMV and other disturbance.

Reply to
efim

No, that won't work. I'm wondering how you can claim to have a lot of experience with CAN, yet not know such a basic fact.

CAN is a bus --- crossed Rx and Tx are not. Once you get down to the physical interface, it's as simple as that.

CAN nodes check their own transmissions to make sure their own Tx hasn't gone haywire. Your nodes would go into "error passive" and eventually "bus off" state, i.e. almost immediately turn themselves off, for reason of getting way too many bit errors, in such a setup.

Frankly I don't think that using CAN is a good choice for a simple on-board point-to-point connection. There are way better tools available for that job.

--
Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.
Reply to
Hans-Bernhard Broeker

"DaveN" skrev i meddelandet news: snipped-for-privacy@g49g2000cwa.googlegroups.com...

Hi Dave.

If you are going to use a serial bus on the same board I would have used I2C or SPI instead. CAN seems to be a little bit overkill.

/Goran

Reply to
Goran Nordstrom

Hans.

As I'm sure you are aware, when you spend a lot of time working with things at one level, you tend to forget some things at lower levels so your remark is not appreciated. This is the reason I have asked the question on here in the first place!!

David Brown's remarks with regard to a simple point to point bus are what I needed.

In terms of suitability and controllers, we have an XC164 which already has 2 CAN ports, one of which is available for this.

We also have to perform some flash programming on both Micros from a single tester and so using the one device as a simple gateway makes sense, further we can reuse much of the reprogramming algorithms and protocols rather than having to transform data into a format suitable for say SPI. So as you can see the point-to-point isn't quite as simple as you may have thought for this application.

Dave.

Reply to
DaveN

Some chips have open drain modes, on the TX, allowing Wire OR of all nodes (same board stuff), and a single pullup.

-jg

Reply to
Jim Granville

The diode drop should not cause a problem, but you can use low voltage drop diodes to be sure.

Reply to
David Brown

Uwe Bonnes ( snipped-for-privacy@hertz.ikp.physik.tu-darmstadt.de) wrote at Wednesday 14 September 2005 10:49 in comp.arch.embedded:

You can do it even simpler: Take a diode with the cathode at tx and the anode connected to rx at every node and a common pullup-R (about 1k) and tie all rx's together.

--
Reinhardt Behm, Nauheim, Germany, reinhardt.behm@t-online.de
Reply to
Reinardt Behm

I have used such hardware for test. The problem is we know nothing about which microcontroller is used , the application and in which environment. The differential inputs of CAN transceiver is not available, we have only digital input. The input low level for microcontroller is possibly max. 0.8V. I think a silizium diode is used. Vf is about 0.7V or 0.3V for some shottky diodes. In this case you have max. 0.5V reserve. If the disturbance by environment are heavy, or PCB has a problem i.e. GND drop voltage by fast edges we are more or less sensibel to recognising low level as high depend on Vf diode. I only mean the developer must think about parts are used and Hardware must be tested by disturbance. CAN use CRC but repeat the messages need a time, and as I understand this channel is used for transfer of big data volumes. The problem is not is it able to work but how it works in the real environment.

Reply to
efim

You are right that it is important to check these things. But if the micro's low input limit is 0.8V, and you use a 0.3V shottky, then your

0.5V noise level should be fine. If not, then you have far more important things to worry about on the card than the CAN bus!
Reply to
David Brown

...

With a At90can128 with a supply of VCC=3.3V and VIL (max)= 0.2*VCC=0.66V and a voltage drop of about 0.65 Volt for a 1N4148 at 4 mA you are playing an insecure game...

Even at VCC=5V, margings are not much higher if temperature drops.

In short, if you are playing around, use the diodes and save some cents, otherwise use a more reliable approach.

--
Uwe Bonnes                bon@elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
Reply to
Uwe Bonnes

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.