Microcontroller with 2 SPI unit and CAN bus

Thread Starter

artmaster547

Joined Jan 6, 2016
409
Hi all
Can anyone suggest a microcontroller with 2 SPI buses/units (need to connect to 2 peripherals over SPI I think having two seperate units will be a lot easier) and 1 CAN Bus, any suggestions would be warmly welcome if anyone knows any under TI or NXP LPC that would be a bonus wanted to gauge peoples opinions first. any help would be greatly appreciated.

Kind Regards

Art
 

MrSoftware

Joined Oct 29, 2013
2,202
Depending on your use case, you can connect multiple devices to the same SPI bus, use the slave select line to select which you are talking with. Here's a good read on it:

https://learn.sparkfun.com/tutorials/serial-peripheral-interface-spi

Also SPI doesn't have to be supported by dedicated hardware, some processors will support SPI using any available general purpose IO lines (GPIO). CAN is probably similar. For example:

https://devzone.nordicsemi.com/question/75820/can-i-use-any-gpio-pins-for-spi-in-nrf52832/

Maybe someone canhelp with a specific processor recommendation if you can describe exactly what you're trying to do, and what your goals are?
 

JohnInTX

Joined Jun 26, 2012
4,787
FWIW a quick search on Microchip shows quite a few PIC32, ARM(32bit) and dsPIC(16bits) with 2 or more SPI and CAN. No hits in 8 bit PIC, though.
As noted, more information about what it has to do will help narrow the search.
Good luck!
 

Thread Starter

artmaster547

Joined Jan 6, 2016
409
Depending on your use case, you can connect multiple devices to the same SPI bus, use the slave select line to select which you are talking with. Here's a good read on it:

https://learn.sparkfun.com/tutorials/serial-peripheral-interface-spi

Also SPI doesn't have to be supported by dedicated hardware, some processors will support SPI using any available general purpose IO lines (GPIO). CAN is probably similar. For example:

https://devzone.nordicsemi.com/question/75820/can-i-use-any-gpio-pins-for-spi-in-nrf52832/

Maybe someone canhelp with a specific processor recommendation if you can describe exactly what you're trying to do, and what your goals are?
Hi I now it is possible to use GPIO pins however I would prefer to use a uC that had dedicated pins for SPI and associated libraries when it comes to coding I believe with past experience it makes setting up timings and so on a lot easier. I am mainly just looking for a uc with more than 3 dedicated SPI ports to be honest, as I realised I can use another IC to setup CAN.

Thanks
Art
 

MrSoftware

Joined Oct 29, 2013
2,202
There are likely many to choose from. The processor I linked above supports 3 SPI master/slave connections in hardware according to the specs:

https://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF52832

Are you familiar with any particular platform or processor already? There is a learning curve when you switch platforms, so if you're familiar with something already then it might be easier to look for something by the same company. For example, if you're familiar with Arduino then something from Atmel might be easier to get up to speed on quickly, as opposed to jumping to Nordic or some other brand.
 

Thread Starter

artmaster547

Joined Jan 6, 2016
409
There are likely many to choose from. The processor I linked above supports 3 SPI master/slave connections in hardware according to the specs:

https://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF52832

Are you familiar with any particular platform or processor already? There is a learning curve when you switch platforms, so if you're familiar with something already then it might be easier to look for something by the same company. For example, if you're familiar with Arduino then something from Atmel might be easier to get up to speed on quickly, as opposed to jumping to Nordic or some other brand.
Hi thanks for the suggestion I may end up using the nordic chip I didn't realise it had 3 SPI connections in hardware thats really good as I can just use an external chip for CAN i.e. SPI to CAN thanks a lot
 

Thread Starter

artmaster547

Joined Jan 6, 2016
409
There are likely many to choose from. The processor I linked above supports 3 SPI master/slave connections in hardware according to the specs:

https://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF52832

Are you familiar with any particular platform or processor already? There is a learning curve when you switch platforms, so if you're familiar with something already then it might be easier to look for something by the same company. For example, if you're familiar with Arduino then something from Atmel might be easier to get up to speed on quickly, as opposed to jumping to Nordic or some other brand.
Form a bluetooth perspective is this chip also compatible with bluetooth 4?

Thanks
Art
 

MrSoftware

Joined Oct 29, 2013
2,202
If you end up with the Nordic, you'll most likely be using the Keil uVision compiler/IDE, and you'll want to understand the Nordic "soft device" functionality. Also the BSP (board support pack) is basically a bunch of code examples that can give you a good boost in getting started, with things like button behavior, bluetooth connections, etc.. In that bunch of code are a number of header files, each one specific to the board that it is designed to work with. You would use one of those headers as a template to make a header for your own custom board (or just use one of their boards as-is). For example, the header defines which pins are assigned to buttons, etc.. It's written to be generic so keep that in mind while reading it. It's quite a step up in complexity compared to something like Arduino. Do a lot of reading before jumping in and it will make more sense. Good luck!
 
Top