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

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



Joined: 08 Dec 2012
Posts: 5

View user's profile Send private message

can bus
PostPosted: Tue Apr 23, 2013 4:06 am     Reply with quote

Hello friends
I am using pic18F452 with MCP2515 & MCP2551 . CCS compiler have drivers - > can-mcp2510.c & can-mcp251x.c. which one will be suitable for my project?

thanks all
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Apr 23, 2013 1:45 pm     Reply with quote

Quote:
can-mcp2510.c & can-mcp251x.c. which one will be suitable for my project?

Those two files are the same except for a few differences, as explained below:

In vs. 4.120, some lines were added or changed in can-mcp2510.c.
CCS didn't change can-mcp251x.c. They haven't made any other
changes since then.

The following lines were added or changed in can_set_mode():
Code:

   struct struct_CANSTAT new_CANSTAT;

      memset(&new_CANSTAT,mcp2510_read(CANSTAT),1);
   } while (new_CANSTAT.opmode != mode);


The following lines were added to can_init():
Code:

   output_low(EXT_CAN_SI);
   output_low(EXT_CAN_SCK);
   output_float(EXT_CAN_SO);


So assuming you have vs. 4.141 or a version near to that, I would say
you should use can-mcp2510.c, since it has the latest revisions from CCS.
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