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

BUS CAN

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



Joined: 09 Dec 2006
Posts: 1

View user's profile Send private message

BUS CAN
PostPosted: Sat Dec 09, 2006 12:21 pm     Reply with quote

Hello:

Pardon by my English.

I�m new in the PIC and I want to make a reader of communications CAN, for them I have a PIC16F876 and a MCP2551 like controller, not very well like using bus SPI to be able to read the data, soon I want them to command by RS232 by a MAX232.

Somebody can put some code to me of example to use this?thanks

Greetings
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Dec 09, 2006 10:04 pm     Reply with quote

Quote:
I have a PIC16F876 and a MCP2551

The MCP2551 is not a CAN bus controller. It's a bus transceiver.
It's function is similar to the MAX232 chip for RS-232. Data sheet:
http://ww1.microchip.com/downloads/en/DeviceDoc/21667d.pdf

To use the CAN bus with a 16F876, you need an external CAN bus
controller chip, such as the MCP2510 or MCP2515. Data sheet:
http://ww1.microchip.com/downloads/en/DeviceDoc/21801d.pdf

Driver file.
c:\program files\picc\drivers\can-mcp2510.c
c:\program files\picc\drivers\can-mcp2510.h

Example file:
c:\program files\picc\examples\ex_can_ccs_b.c
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