Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:14 10 Nov 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : CAN bus on MicroMite MX170??

Author Message
JohnL
Senior Member

Joined: 10/01/2014
Location: Seychelles
Posts: 128
Posted: 10:50pm 16 Nov 2015
Copy link to clipboard 
Print this post

Has anyone implemented CAN bus interface on MicroMite 170 using Microchip SPI MCP2515?

Or if anyone has plans to write a driver or CFunction for MCP2515?

Suitable board

http://www.ebay.com.au/itm/Quality-Arduino-MCP2515-CAN-Bus-Module-TJA1050-Receiver-SPI-Module-/131627697321?hash=item1ea 59f44a9:g:xvYAAOSwo0JWHh-s

I know there is CAN support on PIC32 695/795 , but I am looking for support on MicroMite MX170 as an alternative to using Arduino.

Arduino Library

https://github.com/coryjfowler/MCP_CAN_lib Edited by JohnL 2015-11-18
 
MolsonB
Regular Member

Joined: 25/01/2015
Location: Canada
Posts: 48
Posted: 07:29am 25 Dec 2015
Copy link to clipboard 
Print this post

Bump, I'd like to know this too.

-Matt
MkII 44pin - v5.0

ColorMax 2 - v4.5
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9749
Posted: 02:51pm 25 Dec 2015
Copy link to clipboard 
Print this post

CAN is an interesting bus - I have just been reading about it. I knew the Maximite had CAN support, but I essentially ignored that ability of the Maximite.

Peter(matherp) would be the guru here who could possibly port the Arduino library over to a Cfunction for the MM, but I expect he is on Christmas holiday.

He may well chime in here though.
I'll be watching this thread.
Smoke makes things work. When the smoke gets out, it stops!
 
JohnL
Senior Member

Joined: 10/01/2014
Location: Seychelles
Posts: 128
Posted: 05:10pm 25 Dec 2015
Copy link to clipboard 
Print this post

Current range of Micromite chips don't have a built in CAN controller.
Would be good if someone with knowledge and time implements a CFunction for MCP2515 controller chip using SPI, plenty of Arduino axamples and libraries.

I have since moved my CAN application to Maple mini clone $4 ,STM32f103 that has a built in CAN controller, brilliant little controller board.
http://www.aliexpress.com/w/wholesale-maple-mini.html?spm=2114.01020208.0.326.vLmj78&site=glo&SearchText=maple+mini&g=y& SortType=price_asc&groupsort=1&initiative_id=SB_20151225190252&shipCountry=au
 
MolsonB
Regular Member

Joined: 25/01/2015
Location: Canada
Posts: 48
Posted: 05:52am 26 Dec 2015
Copy link to clipboard 
Print this post

This might be a stupid question, but there's CAN on the colormax2 with a special firmware. Is the code that much different to put into version 5.0?
MkII 44pin - v5.0

ColorMax 2 - v4.5
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9749
Posted: 04:33pm 26 Dec 2015
Copy link to clipboard 
Print this post

I think the problem is that in the Colourmax2, there is a CAN controller, but it was not made use of in the original firmware. A new firmware was released that made MMBASIC aware of the CAN controller in the 695/795 chip. As JohnL says - there is no CAN controller in the Micromite chips, so porting the 695/795 code over won't help, as there is no controller module in the chip for the code to talk to.

Best bet would be the SPI module linked to, but being SPI, I expect that plain SPI commands should be able to be used with that module, and the module will handle the CAN side of things itself - therefore, no need for a Cfunction or other code porting, as you just talk to the CAN module using standard SPI commands kind of thing.

That is my interpretation of things - I might be wrong though......
Smoke makes things work. When the smoke gets out, it stops!
 
MolsonB
Regular Member

Joined: 25/01/2015
Location: Canada
Posts: 48
Posted: 05:09pm 26 Dec 2015
Copy link to clipboard 
Print this post

Doah, that makes sense.

I thought we'd just add the CAN transceiver (MPC2551) and the same code would apply. I didn't know the internals of the 170 was missing the CAN controller logic inside, kind of silly why Microchip would leave that out of their PIC lineup.

I'm doing all my testing on the colormax2. Once I'm happy, I'll build/share the circuit for the 170,etc using MCP2515 & MCP2551.
MkII 44pin - v5.0

ColorMax 2 - v4.5
 
Synergetic

Newbie

Joined: 14/01/2013
Location: New Zealand
Posts: 22
Posted: 10:18pm 24 Sep 2017
Copy link to clipboard 
Print this post

  MolsonB said   Doah, that makes sense.

I thought we'd just add the CAN transceiver (MPC2551) and the same code would apply. I didn't know the internals of the 170 was missing the CAN controller logic inside, kind of silly why Microchip would leave that out of their PIC lineup.

I'm doing all my testing on the colormax2. Once I'm happy, I'll build/share the circuit for the 170,etc using MCP2515 & MCP2551.


Any update ?
 
isochronic
Guru

Joined: 21/01/2012
Location: Australia
Posts: 689
Posted: 12:57pm 25 Sep 2017
Copy link to clipboard 
Print this post

There is a new microchip CAN ic released, apparently with a mikro click board available as well, check MCP2517FD
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025