|
Forum Index : Microcontroller and PC projects : CAN bus on MicroMite MX170??
| Author | Message | ||||
| JohnL Senior Member Joined: 10/01/2014 Location: SeychellesPosts: 128 |
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 |
||||
| MolsonB Regular Member Joined: 25/01/2015 Location: CanadaPosts: 48 |
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 ZealandPosts: 9749 |
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: SeychellesPosts: 128 |
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: CanadaPosts: 48 |
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 ZealandPosts: 9749 |
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: CanadaPosts: 48 |
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 ZealandPosts: 22 |
Any update ? |
||||
| isochronic Guru Joined: 21/01/2012 Location: AustraliaPosts: 689 |
There is a new microchip CAN ic released, apparently with a mikro click board available as well, check MCP2517FD |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |