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

CANBUS using PIC 18F4580

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



Joined: 29 Apr 2009
Posts: 13
Location: Kolkata,India

View user's profile Send private message Send e-mail

CANBUS using PIC 18F4580
PostPosted: Wed Apr 29, 2009 3:54 am     Reply with quote

Hello everyone. I want to develop a board using PIC18F4580 with a Transmission oil pressure sensor connected at AN0 and convert the analog value to CANbus signal (extended format) which will be viewed on PowerView Display(CANBUS enabled Display Device). Can anybody say what should be the basic board layout and software code? Plz reply.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Apr 29, 2009 1:42 pm     Reply with quote

This schematic from the Microchip forum shows the basic CAN bus
connections between two 18F458 chips (18F4580 is similar):
http://www.microchip.com/forums/upfiles.aspx/52252/1E05A177D4B746B0B4C23DB18CC4F360.JPG

CCS Driver files:
Quote:
c:\program files\picc\drivers\can-18f4580.c
c:\program files\picc\drivers\can-18f4580.h


CCS example file:
Quote:
c:\program files\picc\examples\ex_can_ccs_a.c
UDIPTA



Joined: 29 Apr 2009
Posts: 13
Location: Kolkata,India

View user's profile Send private message Send e-mail

PostPosted: Wed Apr 29, 2009 10:18 pm     Reply with quote

Thanks for reply. Can you please send me the program (written in PIC C compiler) using PIC18F458 & MCP2551 which produce CAN signal as output and uses analog signal as input. (Precisely,an analog pressure sensor is connected at PORT AN0.)
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Apr 29, 2009 10:21 pm     Reply with quote

No, I will not do your project for you. You need to write the code.
UDIPTA



Joined: 29 Apr 2009
Posts: 13
Location: Kolkata,India

View user's profile Send private message Send e-mail

PostPosted: Wed Apr 29, 2009 10:41 pm     Reply with quote

Of course. I myself will write the code. I just want to know how I can convert analog to canbus signal? Is ADC conversion required? Plz help.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Apr 30, 2009 1:10 am     Reply with quote

Yes, an A/D conversion is required.
See the Ex_can_ccs_a.c file that I noted above. Also see this post:
http://www.ccsinfo.com/forum/viewtopic.php?t=32168&start=1
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