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 support@ccsinfo.com

CAN BUS Communication

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



Joined: 01 Oct 2007
Posts: 11

View user's profile Send private message

CAN BUS Communication
PostPosted: Mon Oct 01, 2007 3:06 pm     Reply with quote

Hello,
I am new at this and I am having great issues with getting my 2 pic boards to communicate. I am using 2 PIC18F4680 pics. One on each board. I have a MCP2551 connected to each pic. I am using the EX_CAN Example file to try to get these 2 pics to talk to each other. I am having no luck. I have them both setup with internal clock of 8MHz. I have been successful with both pics in Loopback mode but I just can't seem to get them to talk to each other.

I am using can-18xxx8.c file for my CAN Bus setup.

Anybody have any clues, or suggestions on what I could be doing wrong?

Thanks
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Oct 01, 2007 3:23 pm     Reply with quote

See these threads:
http://www.ccsinfo.com/forum/viewtopic.php?t=26733
http://www.ccsinfo.com/forum/viewtopic.php?t=26442

General trouble-shooting of CAN bus problems:
http://www.ccsinfo.com/forum/viewtopic.php?t=27936

Here's a test program for two boards to talk to each other:
http://www.ccsinfo.com/forum/viewtopic.php?t=29627&start=7
Youngpup



Joined: 01 Oct 2007
Posts: 11

View user's profile Send private message

Thanks PCM.
PostPosted: Wed Oct 03, 2007 9:58 am     Reply with quote

I read though all the links and used your Test program. I was still having issues. But I was able to figure it out. The Test program really helped. I was my clock. I was trying to use the internal clock on the pic. But for some reason one pic was working and one wasn't. I added a 10MHz oscillator and everything worked fine. I just now have to figure out how to get the internal clock to work.

Thanks
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