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
thefloyd



Joined: 02 Sep 2009
Posts: 46

View user's profile Send private message

CAN bus
PostPosted: Thu Mar 28, 2013 7:17 pm     Reply with quote

I'm undertaking a new project and I'm diving into some things I'm a bit green at. Some pointers/advice would be much appreciated..

I'm attempting to build a bridge from my vehicle's steering wheel controls to an iPod, as the car never had the option. This is a late model GM car, and as such I already know the steering wheel controls and some of the other things I may be interested in are on a low speed single wire CAN bus (speaking GMLan). I'm pretty sure I know enough about the protocol and what I'll see on the wire to make that bit work. I've also already been addressing an iPod over the 19.2k serial interface, so I've got THAT bit down.

What I'm unclear on is how to initialize and listen/speak CAN using CCS. I plan on using the TH8056 (melexis) external transceiver as that's already certified to work with GMLan setups. Any pointers/code snippets on how I can initialize the microcontroller's CAN interface at 33k (low speed CAN) and read/write from/to the bus? I explored using something like an ELM327 and speaking RS232 to CAN, but that seems silly given many PICs have a built in CAN module. A whole pile of parts (including a couple of different PICs with hardware CAN bus) will be arriving tomorrow so I'd love to try and tackle this over the weekend. Any pointers would be sincerely appreciated.

Thanks!
thefloyd



Joined: 02 Sep 2009
Posts: 46

View user's profile Send private message

PostPosted: Thu Mar 28, 2013 8:54 pm     Reply with quote

Never mind.. I think I may have found what I was looking for in the examples and using the CAN configuration tool built into the PIC wizard, including the custom baud rate!
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Mon Apr 01, 2013 12:46 pm     Reply with quote

thefloyd wrote:
Quote:

I'm attempting to build a bridge from my vehicle's steering wheel controls to an iPod, as the car never had the option.

If this feature of your car it is an option, you could enable it using any GM Professional Diagnostic Scanner.

thefloyd wrote:
Quote:

I'm pretty sure I know enough about the protocol

Full details of the protocol used by GM it is not available easily. If you got such info, you must know -in detail- the protocol used by GM in
order to know each CAN frames and every CAN branches and its packet's privileges. Assuming that, you should also consider all nodes and
check the consistency of the message being received, the host system will acknowledge your mesage as consistent message, if not it will
flag as an inconsistent message in the ACK time SLOT and depending of the treatment that the ECU assign to this error, there are chances
that it would store it as an Fault Error triggering the Check Light.

I admit that it is an interesting project to play with. Another story is if you want to sniff or listen a specific packet and do something inocuous
without interfere the whole network.


regards,

Humberto
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