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 11 bit addressing

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








CAN Bus 11 bit addressing
PostPosted: Wed Dec 09, 2009 7:08 pm     Reply with quote

I am using a PIC18F4580 to read CAN packets from a motec M400 ECU.

I don't have the code with me at the moment, but I seem to be having trouble reading any address from the ECU that is below 2048. So looks like I can only read 29 bit addressing. I know you can store an 11 bit value in a 29 bit space. But is there a way to specify that you only want to read an 11 bit address, just like you can specify if an address is basic or extended when using
Code:
can_putd(int32 id, int * data, int len,int priority, int1 ext, int1 rtr);

where int1 ext defines 11 or 29 bit.

Many thanks

Juan
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Dec 10, 2009 1:41 pm     Reply with quote

The default setting is to use 29-bit ID's. Look in the .H file for the CCS
CAN driver that you're using. You'll see this:
Code:
#IFNDEF CAN_USE_EXTENDED_ID
  #define CAN_USE_EXTENDED_ID         TRUE
#ENDIF
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