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.
CAN without transceivers
Started by ●September 13, 2005
Reply by ●September 13, 20052005-09-13
> 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. >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 by ●September 13, 20052005-09-13
DaveN <dave_at_work_workin@hotmail.co.uk> wrote:> 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.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 by ●September 13, 20052005-09-13
"DaveN" <dave_at_work_workin@hotmail.co.uk> skrev i meddelandet news:1126611186.369548.159790@g49g2000cwa.googlegroups.com...> 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. >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 by ●September 13, 20052005-09-13
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 by ●September 13, 20052005-09-13
DaveN wrote:> 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.Some chips have open drain modes, on the TX, allowing Wire OR of all nodes (same board stuff), and a single pullup. -jg
Reply by ●September 13, 20052005-09-13
On 13 Sep 2005 18:24:50 +0200, "Goran Nordstrom" <goran.nordstrom@ipbolaget.com> wrote: [snip...snip...]>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.I'd agree but I can also see that having 15 message objects that are highly self-sufficient (as compared to I2C & SPI) might come in handy in some applications. -- Rich Webb Norfolk, VA
Reply by ●September 14, 20052005-09-14
Yeah, I think Goran is right to some degree. If it was a design from scratch and we had no other external requirements for CAN then clearly SPI would have been the way to go; we may still go SPI even now but we have to look at the extra software required for this and as Rich says all those message objects are very useful. In fact the XC164 has 32 message objects, although they have to be shared between the two CAN ports.
Reply by ●September 14, 20052005-09-14
DaveN <dave_at_work_workin@hotmail.co.uk> wrote:> 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?Connect TX of each CAN interface to /EN of a HC125, drive each HC125 input low and connect both HC125 output together and to RX of both interfaces and pull up to VCC. -- Uwe Bonnes bon@elektron.ikp.physik.tu-darmstadt.de Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt --------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
Reply by ●September 15, 20052005-09-15
Uwe Bonnes (bon@hertz.ikp.physik.tu-darmstadt.de) wrote at Wednesday 14 September 2005 10:49 in comp.arch.embedded:> DaveN <dave_at_work_workin@hotmail.co.uk> wrote: >> 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? > > > Connect TX of each CAN interface to /EN of a HC125, drive each HC125 input > low and connect both HC125 output together and to RX of both interfaces > and pull up to VCC.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