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 PROBLEM!

 
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 PROBLEM!
PostPosted: Thu May 07, 2009 5:28 am     Reply with quote

I am trying to develop a project for our machine,i.e. Crane,with PIC18f2480 as Canbus protocol controller and PCA82C520 as Can controller interface. I am taking analog input from a Transmission oil pressure sensor and would like to see pressure on Powerview, a J1939 enabled display module. At present we monitor other engine and transmission parameters on Powerview. I can't understand how I can get the differential voltage on CANH & CANL line from analog value and how can I send this value to Powerview display module i.e. what should be it's ID,I am totally in dark! Please help me.
andrewg



Joined: 17 Aug 2005
Posts: 316
Location: Perth, Western Australia

View user's profile Send private message Visit poster's website

PostPosted: Thu May 07, 2009 7:21 am     Reply with quote

I did a Wikipedia search for J1939 and got an interesting page with several useful links. I'd start there. One of the links had some info on the message ID and data bytes. It does look likely that you'd need to purchase the standard for complete details, but maybe more searching would turn up enough details for something workable.

As for the differential voltage, assuming both are within the PICs ADC input range, you read both and find their difference, then package that up into a suitable packet. If they aren't, you'll need some extra electronics to either read the voltages instead of the PIC, or filter them so the PIC can read them. I'm afraid I can't help there - you'll have to see if someone else who knows more about that reads this.
_________________
Andrew
UDIPTA



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

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

PostPosted: Fri May 08, 2009 12:21 am     Reply with quote

Thanx Andrew for replying. But still I can't move a bit forward. I need more help from all of you. Please help me out!
Thanks in advance..
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri May 08, 2009 12:42 am     Reply with quote

Look at the CCS CAN bus development kit:
http://www.ccsinfo.com/product_info.php?cPath=Store&products_id=CANbuskit
It has exercises that show how to read an analog voltage, convert it to
numbers, and transmit the numbers on the CAN bus.

Here is the manual:
http://www.ccsinfo.com/pdfs/Development_Kit_for_the_CANBus_Exercise_Book.pdf

Edit: The link to the manual no longer works. CCS removed the
product manuals from online access a few days ago.

---


Last edited by PCM programmer on Sat May 16, 2009 10:34 am; edited 1 time in total
george



Joined: 14 Mar 2008
Posts: 10

View user's profile Send private message

Can bus help
PostPosted: Sat May 16, 2009 12:40 am     Reply with quote

First you have to convert your analog signal into digital a 16 bit number then you transmit your message on to the can bus. You will need to use a 18 series part with a can module. Variables such as baud rate and other variables have to be set. I have used the Can bus module kit by CCS and this probably would work for your needs. J1939 is a open standard should be able to google it. You must use a can transceiver (built in with can bus module kit ) with appropriate resistors to attach to the bus. CCS has built in can Bus libraries in their pic 8 bit and now 16bit parts.
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