CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

CAN node implementation using PIC18F2585

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Aug 13, 2009 12:53 am     Reply with quote

This post has a simple test program for two CAN bus boards to
communicate with each other.
http://www.ccsinfo.com/forum/viewtopic.php?t=29627&start=7


I notice you have a 47K resistor for RS on the MCP2551. I think that
value is too large. In the designs at our company, we connect the Rs
pin to Ground. We have pads for a resistor on the board, but we install
a 0-ohm resistor.

To connect the two CAN bus boards together:

1. Put a 120 ohm resistor across the CANH and CANL pins of the MCP2551 on each board. The resistors should be mounted close
to the MCP2551 on each board.

2. Connect CANH on Board #1 to CANH on board #2.

3. Connect CANL on Board #1 to CANL on board #2.

4. Connect a ground wire between both boards.

The two wires for CANH and CANL should be twisted pair.

There is a drawing in this link:
http://www.interfacebus.com/Design_Connector_CAN.html
kansusid



Joined: 12 Jun 2006
Posts: 9
Location: INDIA

View user's profile Send private message

PostPosted: Thu Aug 13, 2009 3:31 am     Reply with quote

Thanks for the details. Is it possible to have some thought over only 3 times output in normal mode? Since few others have had this problem(can be seen in the forum postings), is it a common bug? My compiler version PCWHD 4.0.0.0

Thanks in advance
_________________
kansusid
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Aug 13, 2009 11:50 am     Reply with quote

Quote:

In connecting 2 nodes using MCP2551, could you pl suggest the hardware connections and simple code to just check handshaking ok?

Is it possible to have some thought over only 3 times output in normal mode?

Why don't you try the two board test program (and the connections)
that I posted in response to your request ? See if it works.

Quote:
My compiler version PCWHD 4.0.0.0

That's not the compiler version. You probably got that number
by right-clicking on the CCS icon and going to the Properties box.
The compiler version is given at the top of the .LST file. It's a number
in this format: 4.xxx
The .LST file is in your project directory.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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