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 CCS Technical Support

pic18f46q83 - canbus

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



Joined: 05 Jan 2014
Posts: 15

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

pic18f46q83 - canbus
PostPosted: Sat Apr 12, 2025 4:10 pm     Reply with quote

Hi everyone, I will start a new project with pic18f46q83 and use canbus, wizard says use mcp driver but for pic18f25k80 for example I used can-18f4580.c, which driver is for pic18f46, I am not sure , tried can-18f4580 but it gives some errors, any suggestion
ccxenova



Joined: 03 May 2025
Posts: 1

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

PostPosted: Sat May 03, 2025 11:54 pm     Reply with quote

Can anyone provide some insight on this topic? I'm interested because I've encountered similar situations. If anyone has a solution or suggestions, please let me know. Thank you guys..
temtronic



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

View user's profile Send private message

PostPosted: Sun May 04, 2025 8:57 am     Reply with quote

'gives some errors'...
OK, which ones
Do you have proper wiring and terminations ?
Do you have proper power supply ?
Ttelmah



Joined: 11 Mar 2010
Posts: 19831

View user's profile Send private message

PostPosted: Sun May 04, 2025 9:24 am     Reply with quote

The point is that the Pic18f46q83, does not have a built in CanBus peripheral,
so you need to be using an external CanBus interface. The MCP 2515 or
2551, is the standard device to use. The driver you need will depend on
which peripheral you use. The chip drivers are for devices that have got
an internal CAN peripheral. The 4580, has a can peripheral. The 25K80
has the ECAN module, so can use either the standard internal CAN driver
or the ECAN driver (preferably the latter).
Think 'peripheral first'. If your device has a particular peripheral, look for
what other chips have this same peripheral, and then for the drivers for
these. If your chip doesn't have a peripheral, then instead you need to be
using an external peripheral and the drivers for this.
The wizard is saying that since the chip does not have a can peripheral,
you need to be using the drivers for the MCP peripherals (ad fitting these).....
jaka



Joined: 04 May 2014
Posts: 39
Location: Finland

View user's profile Send private message

PostPosted: Mon May 05, 2025 12:20 am     Reply with quote

The PIC18F46Q83 does have CAN peripheral (and Q84 family has CANFD peripheral).

However, I haven't tried to use CAN with Q83/Q84 devices. I have only used CAN with PIC18F26K83. It does work with CCS supplied drivers.
Ttelmah



Joined: 11 Mar 2010
Posts: 19831

View user's profile Send private message

PostPosted: Mon May 05, 2025 2:33 am     Reply with quote

Not according to the data sheet......
As you say the Q84 does, but not the 46Q83. Microchip appear to be
partially documenting things wrongly. Their 'features' page says it
has the CanFD peripheral, but if you go to the device selector, and
specify CAN, it does not list the device, and the data sheet does not
show CAN anywhere.....
It has a DALI interface but not a CAN interface, unless the data sheet is
wrong.
I think a direct question to MicroChip is needed.

The device editor says 'CANOBJ', not CAN, ECAN, or CANFD, which
are the normal peripheral selections. There is no driver listed for CANOBJ,
and no reference to this in the manual... Sad
dyeatman



Joined: 06 Sep 2003
Posts: 1956
Location: Norman, OK

View user's profile Send private message

PostPosted: Mon May 05, 2025 4:02 am     Reply with quote

Interesting. The datasheet I have in my archive also doesn't show CAN (i have one of the chips).

However, the Microchip Direct website feature list shows the entire Q83 line as having a CAN
module. Plus the Datasheet they have shows it as well so it must have been updated.

https://www.microchipdirect.com/product/PIC18F46Q83-I/P?srsltid=AfmBOoo70317xeD_ohkOjRbk72RIS9lr2ULtbc_IEfQjQO5npsFNQkNa

I guess its not the first time MChip has gotten crossed up...
_________________
Google and Forum Search are some of your best tools!!!!
Ttelmah



Joined: 11 Mar 2010
Posts: 19831

View user's profile Send private message

PostPosted: Mon May 05, 2025 4:42 am     Reply with quote

The data sheet currently on their site still does not show it./ Without this,
it becomes impossible to know how to drive it. That CCS have listed thw
CANOBJ entry is very odd, since they give the peripherals as CAN, ECAN,
and CANFD, no mention of CANOBJ. There are no drivers for CANOBJ,
so driving this is currently basically a matter of trying each driver, and
then being prepared to fiddle when they don't work. Without data, the
'fiddle' part is going to be impossible.... Sad
We don't even know what if any registers it actually has, or what the
features of each are.
I'd go to a chip with data I'm afraid. Trying to drive this if it does have
a CAN peripheral is going to take an absolute age.
dyeatman



Joined: 06 Sep 2003
Posts: 1956
Location: Norman, OK

View user's profile Send private message

PostPosted: Mon May 05, 2025 5:30 am     Reply with quote

Strange. Not sure what datasheet you are seeing.
The one I see on the regular site as of today shows CAN as well.

https://www.microchip.com/en-us/product/pic18f46q83

Table 1 in this sheet shows all three versions having it. It is also listed under Digital Peripherals
_________________
Google and Forum Search are some of your best tools!!!!
Ttelmah



Joined: 11 Mar 2010
Posts: 19831

View user's profile Send private message

PostPosted: Mon May 05, 2025 8:16 am     Reply with quote

That is fun. I have the same data sheet, pulled on Friday at 16:09, and it
has not got the CAN section........
Anyway if you look at that, the chip has the more sophisticated controller
that support objects. So the driver needs to be can_pic18_obj.c
annoyingly this one CCS do not provide as example for.
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