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

problem with can bus pic18f458

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



Joined: 27 May 2013
Posts: 4

View user's profile Send private message

problem with can bus pic18f458
PostPosted: Mon May 27, 2013 4:02 am     Reply with quote

I'm new in CAN, and I'm writing codes for pic18f458 that made a simple can bus with two nodes.
one of the micros is in normal mode and always is sending data to the bus, and the other one is in listen only mode and should accept any data with any ID,
but at the start of the communication a bus error occurs and the data couldn't be sent,
can you help me with this problem?? Question
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

PostPosted: Mon May 27, 2013 10:41 am     Reply with quote

show your code and compiler version at least

i'm no mind reader dude Very Happy Very Happy Surprised

have you looked at EX_CAN.c ??
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon May 27, 2013 1:12 pm     Reply with quote

Read this thread. It has a link to a CAN bus test program for two boards.
It also has links to schematics that show how to connect the 18F458 PICs
to the MCP2551 CAN bus drivers, and how to connect the termination
resistors. This thread has links to everything you need to do your test:
http://www.ccsinfo.com/forum/viewtopic.php?t=47545

All of this is for real hardware boards. It's not for Proteus.
z.sh



Joined: 27 May 2013
Posts: 4

View user's profile Send private message

re
PostPosted: Tue May 28, 2013 12:18 am     Reply with quote

Hi, asmboy and PCM programmer

I am using the Mikroc for writing my codes, if I write them here, can you help me? I have asked the same question in Mikroelectronika's forum but I haven't gotten any answer yet, so I had to ask here!
sorry and thanks for your help


Last edited by z.sh on Tue May 28, 2013 1:08 am; edited 1 time in total
z.sh



Joined: 27 May 2013
Posts: 4

View user's profile Send private message

re: PCM programmer
PostPosted: Tue May 28, 2013 12:32 am     Reply with quote

PCM programmer:

Thanks for these information they were very useful,
but I used them in my test circuit, I have written test codes for two nodes in mikroc and it worked well and 2 micro controllers can send data to each other through the CAN bus
I have this problem in listen only mode, can you show me some example codes for listen only mode?? (in any language or compiler)
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue May 28, 2013 10:27 am     Reply with quote

We can't support MikroC on this forum. I haven't done a Listen-Only
CAN bus project. My best advice is to Google for it. Use this search
string with Google:
Quote:
site:microchip.com/forums "Listen only"
z.sh



Joined: 27 May 2013
Posts: 4

View user's profile Send private message

re: PCM programmer
PostPosted: Tue May 28, 2013 11:25 pm     Reply with quote

I have searched a lot on google but nothing useful found!
By the way, thanks for reply.

Best Regards
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