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 PIC18f45k80
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
temtronic



Joined: 01 Jul 2010
Posts: 9097
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Tue Jan 01, 2019 6:30 am     Reply with quote

OK, .... do the CCS supplied example programs work as expected with the CCS hardware ??

Start there. IF they don't work, contact CCS and/or post here. Hopefully someone here HAS used that kit.
I did a very quik read of the ad...says there are 4 nodes, so it could be a 'bus' problem? I don't use CAN..just trying to help.

Jay
Sterngleiter



Joined: 07 Jan 2013
Posts: 90

View user's profile Send private message

PostPosted: Tue Jan 01, 2019 6:34 am     Reply with quote

yes, the programs are running. I do not understand that, frankly. I also know the Can bus with 120r completion resistance.
temtronic



Joined: 01 Jul 2010
Posts: 9097
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Tue Jan 01, 2019 6:42 am     Reply with quote

well that's GOOD news....
now we KNOW it's NOT a hardware issue,has to be 'something' in YOUR code.
If you're using the same UNMODIFIED drivers, I'd think 'setup' or 'configuration' variables aren't correct however if you've edited the drivers,well that could be the problem.

I'd go back to working CCS code, copy, saving as 'prg2try', edit 'pgm2try' with 1 or 2 changes, compile ,test, see what happens. every time these small changes work, save as 'pgm3try', pgm4try', etc..... that way you can go back to a WORKING version, easily. If you make several changes and not notice x=3 when it should be x=2, you'll lose a lot of hair !!

Take 'baby steps' NOT 'giant steps', build upon KNOWN code.

Jay
Sterngleiter



Joined: 07 Jan 2013
Posts: 90

View user's profile Send private message

PostPosted: Tue Jan 01, 2019 3:36 pm     Reply with quote

anyone an idea maybe, ecan and canbus are the same or?
temtronic



Joined: 01 Jul 2010
Posts: 9097
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Tue Jan 01, 2019 6:25 pm     Reply with quote

I'd have to use Google to answer but...
my gut tells me that

1) 'Canbus' perhaps refers to the physical and electrical specs of 'how' data is sent between devices that use the 'CAN' protocol

2) 'Ecan' perhaps refers to set of extensions or additional options 'Extended Can'. Similar to EOBDII being extended or additional options/command to the original OBDII specifications.

The fact that the CCS supplied programs run on the CCS PCB, means their software and hardware is OK. Are you modifying their code to run on a different PIC? Something you've added ?

edit.. OK I checked the datasheets.. and the 'K' version you're trying to use is NOT the same as the PIC in the CCS kit. So I assume you've created a breadboard or PCB with the K version PIC ? If so does the PIC actually operate ? Will it run the CCS examples ? You need to find out if it's hardware or software. Run simple programs like 1Hz LED to test speed, use scope for ringing, maybe the CCS example can run on it ??

I don't have the kit, that PIC or any way to do proper hardware testing. Hopefully someone who has does CAN with CCS kit will respond.


Jay
Ttelmah



Joined: 11 Mar 2010
Posts: 19215

View user's profile Send private message

PostPosted: Wed Jan 02, 2019 2:13 am     Reply with quote

Canbus, is canbus.

Ecan, is the 'enhanced' can peripheral. Has some extra features, but is
largely reverse compatible with the standard peripheral.
can-18F4580.h/c, is the driver for using the ECAN module.
can-18xxx8.h/c, is the driver for using the standard CAN module.

This later driver will _not_ fully initialise the ECAN module.
Using the basic driver may well give problems.
The ECAN is meant to be 'fully backward compatible', but I have seen
issues when the standard CAN driver is used for this module.

There are 16 filters in the ECAN controller versus 6 in the CAN controller.

He should be using the ECAN driver and setting the TRIS as required for
his chip.

If he has mounted a 45K80, into the standard proto board, how has the
Vddcore connection been done?. The behaviour of the chip is _very_
dependant on this being a low impedance connection, with a capacitor
with the right ESR.

This poster:
<http://www.ccsinfo.com/forum/viewtopic.php?t=57136&highlight=ecan>
is using the larger brother of the chip being used here, and has CAN
running OK in legacy mode using the ECAN controller and code.
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