View previous topic :: View next topic |
Author |
Message |
Storyteller
Joined: 25 Feb 2019 Posts: 2
|
PIC16F1823 + Module MCP2515 CAN |
Posted: Mon Feb 25, 2019 11:08 am |
|
|
Hello everyone. I am working on a project using a PIC16F1823 with an MCP2515 CAN Bus Module. I am new to PIC and CAN Network I wanted a help on how do I make the configuration and connection to the network.
My project is to connect the network of a car and besides being able to make the scanner via OBD also be able to make changes in the modules, for example to change the speed limit.
Is it possible to do something like this? |
|
|
dluu13
Joined: 28 Sep 2018 Posts: 395 Location: Toronto, ON
|
|
Posted: Mon Feb 25, 2019 11:38 am |
|
|
I have not used CAN bus myself, but check out the examples folder in your CCS install directory.
There are a couple of CAN bus examples in there. There are also MCP251x drivers in the drivers folder that you can use. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9251 Location: Greensville,Ontario
|
|
Posted: Mon Feb 25, 2019 11:41 am |
|
|
yes, as stated, get the CCS supplied examples working first.
CAN is extremely complicated and 'top heavy'. You'll probably spend 90% of your time getting CAN to work, the PIC code is simple ! |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19559
|
|
Posted: Mon Feb 25, 2019 12:03 pm |
|
|
I'd also have to query the chip selection. 128bytes of RAM and 3.5K
program memory, will be 'tight' for CAN if you want to do anything
much with it. The smallest PIC that the example will as standard builds with
has 4* the RAM, and 2.5* the ROM (PIC16F1936). Though I'm a believer
in how much you can do with smaller PIC's, I have to suggest that a larger
chip will make it easier to fit everything.... |
|
|
Storyteller
Joined: 25 Feb 2019 Posts: 2
|
|
Posted: Mon Feb 25, 2019 12:12 pm |
|
|
Thank you guys. I'm going to study the examples and see what I can do. Anything comes back here and I ask for more help. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9251 Location: Greensville,Ontario
|
|
Posted: Mon Feb 25, 2019 12:22 pm |
|
|
As Mr. T points out 'bigger is better' ! I usually use a PIC18F46K22 for 99% of the products even though it's 'overkill', I've never run out of codespace or I/O pins. That being said , the current PIC project WILL just fit into the 'skinny sister' a '26k22' PIC and EVERY pin has a purpose.
Jay |
|
|
|