|
|
View previous topic :: View next topic |
Author |
Message |
dgi
Joined: 07 Jan 2004 Posts: 11 Location: Philadelphia, USA
|
PIC18FXX8 CANbus conflict |
Posted: Mon Mar 15, 2004 1:35 pm |
|
|
I have been working with the PIC18F258, and have encountered intermittent "noise" on the CAN bus which I think is caused by the PIC.
I find out about this from my PC utility program "PCANView USB" which goes "BUSHEAVY" and "BUSOFF" occasionally. Simultaneously, the PIC TXERR and RXERR counters go crazy- count up and down indicating that there is a problem with my physical layer- the signals are not clean and messages are received with many errors.
For a while I didn't know what caused this. But now I have demonstrated that writing to other pins on portB at high frequency causes this problem. For example, executing output_low(PIN_B0) at 10Khz causes noise on the CAN bus. This happens even with FAST_IO, so I don't think it has anything to do with the TRIS registers. And it happens even when the pin's output level is not changed- it is only necessary to write the same thing over and over again, and my CANbus is disabled. At 500 Hz, there is only a little noise detected in the RXERR and TXERR counters. But at 10Khz or 20 KHz, my CAN adapter repeatedly goes BUSOFF. This happens when writing to B0, B1, B4, B5, B6, B7, but not portA or portC.
Anybody else experience the same thing, or have any ideas for what I'm doing wrong or workarounds?
Thanks
DGI. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Mon Mar 15, 2004 2:20 pm |
|
|
We're using 18F458 on two different boards, and we have
not seen this problem.
On one board, the PIC is running at +5v, so we used the SN65HVD251
driver chip.
On our other board, which runs at +3.3v, we used the SN65HVD231D
driver chip.
I would look closely at grounding, power supply decoupling, etc. |
|
|
kender
Joined: 09 Aug 2004 Posts: 768 Location: Silicon Valley
|
|
Posted: Fri May 26, 2006 6:29 pm |
|
|
Folks,
Will +3.3V and +5V nodes interoperate on the same CAN bus? Are there any caveats? The bus is mechanically small and the cables are shielded.
Cheers! |
|
|
sjbaxter
Joined: 26 Jan 2006 Posts: 141 Location: Cheshire, UK
|
|
Posted: Sat May 27, 2006 11:39 am |
|
|
It doesn't matter what supply rail you use for the processor and its peripherals, the CAN bus voltage levels are determined by the tranceiver used. Which is usually between 2 and 3 volts differential between CAN_H and CAN_L.
As long as the tranceivers are of a 'common type' accross the network you will have no problems. By 'common type' I mean low speed, high speed, fault tollerant, etc. See the different specs for 82C250, 82C251, TJA1050, etc. _________________ Regards,
Simon. |
|
|
kender
Joined: 09 Aug 2004 Posts: 768 Location: Silicon Valley
|
|
Posted: Sat May 27, 2006 1:14 pm |
|
|
sjbaxter wrote: | It doesn't matter what supply rail you use for the processor and its peripherals, the CAN bus voltage levels are determined by the tranceiver used. Which is usually between 2 and 3 volts differential between CAN_H and CAN_L. |
In my can node I have to use parts that require 3.3V, so I want to have only one +3.3V supply rail and power everything - including the CAN transceiver - from this rail. My node will be talking to other nodes that I have no control over, and I don't know in advance what those nodes are. As far as I understand, a CAN transceiver powered from the 3.3V bus can deliver a 3V differential output, and transceivers with different supply voltages (say, +5V) will be able to receive it.
Did I get it right? |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|