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 problem - getting started
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
newguy



Joined: 24 Jun 2004
Posts: 1903

View user's profile Send private message

PostPosted: Fri Jul 29, 2005 4:42 pm     Reply with quote

Uh, the mystery deepens. I'm still using the 18LF458's, not the 4580's. ???

Nope, just found it: they did the same thing in the can-18xxx8.h file. I changed that line to define CAN_ENABLE_DRIVE_HIGH to 1. Now everything works without the external pullups.

PCM, again, thanks. I owe you many beers.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Jul 29, 2005 5:00 pm     Reply with quote

Oops.

The 18F458 does have that bit. I didn't see it on a quick look at the
data sheet. Also, the can-18xxx8 driver sets ENDRHI = 0 as well.
So how does it work on my boards ? I'll have to investigate this further.

----

OK. Mystery solved. The CAN bus transceiver chips that I've used
in the past have got an internal pull-up on the TX pin.

From page 5 of the MCP2551 data sheet:
Quote:
TXD has an internal pull-up resistor (nominal 25 k)


The LT1796 transceivers don't have an internal pull-up. The data
sheet doesn't show it. That finally explains everything.
hoanf



Joined: 27 Aug 2006
Posts: 1

View user's profile Send private message

PostPosted: Fri Sep 21, 2007 10:00 pm     Reply with quote

Thank for your code!

But now how we can use the filter to get the message by using CAN driver . Please give the guide

Cheers
Tran Hoan
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Sep 21, 2007 11:23 pm     Reply with quote

Use the forum's search page. The information is in the forum archives.
http://www.ccsinfo.com/forum/search.php

Search for the function name that's used to setup the Rx filters.
The function name is: can_set_id
Search for that.

Also search for: can bus filter
Set it to: Seach for all terms

There are several threads on it. Here are a few hits.
http://www.ccsinfo.com/forum/viewtopic.php?t=29533
http://www.ccsinfo.com/forum/viewtopic.php?t=27325
http://www.ccsinfo.com/forum/viewtopic.php?t=24198
dan taulbee
Guest







CAN troubles
PostPosted: Wed Mar 26, 2008 11:43 am     Reply with quote

My situation is this:
I'm using a PIC18F4680, and I'm running ex_can.c with the 18xxx8.c and .h files. I do NOT have a CAN developer kit with an LCD display, so I'm pretty sure the printf statements are useless for me. I'm using a program called PCAN-View that monitors the CAN bus. Shouldn't I be receiving the messages from the CANH and CANL pins? The software works when hooked up to a vehicle's CAN bus, but isn't picking anything up from the CAN-EX file.

Dan
dan taulbee
Guest







resolved
PostPosted: Thu Mar 27, 2008 7:24 am     Reply with quote

Ok, now I'm getting CAN data on the CANH and CANL pins of my board. I am not, however, receiving this data on my computer's software. The software (and adapter) once again is PCAN-USB.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Mar 27, 2008 11:04 am     Reply with quote

Quote:
I do NOT have a CAN developer kit

What board do you have ?
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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