Hello,
I'm using a Matrix Portal M4 along with 64x32 LED matrix display. It's working really well. But I need to add an SD card for data logging. How can I add a SPI device to the Matrix Portal M4? I see the four analog breakout pins, and I understand these can be used to support SPI hardware, but I can't figure out how to set it up to interface with a SPI SD card module.
I'm using arduino IDE to code this project.
Thanks for any help you can provide.
Adding a SPI device to Matrix Portal M4
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- dastels
- Posts: 15653
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Adding a SPI device to Matrix Portal M4
Hardware-wise, the SDcard is a simple SPI device, 4 pins: MOSI, MISO, SCK, CS. The A1-A4 pins on the Matrix Portal are on SERCOM0, soyou should be able to get it up and running on that. The MatrixPortal 3.3v output will handle an SDcard happily. Have a look at for more information on setting up a SPI interface. Not something I've delved into before, but it looks reasonably straightforward.
Dave
Dave
- gmherrera
- Posts: 2
- Joined: Sun Aug 01, 2021 9:33 pm
Re: Adding a SPI device to Matrix Portal M4
Thanks for the reply Dave, I appreciate the support. You started to mention a resource for me to take a look at for some help setting up the SPI interface on the Matrix Portal M4, but I'm not sure where to go. It looks like you left out a pointer for where I should be looking for more help. Thanks again!Have a look at for more information on setting up a SPI interface.
Gerry
- dastels
- Posts: 15653
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Adding a SPI device to Matrix Portal M4
My bad. I forgot to paste the link: https://learn.adafruit.com/using-atsamd ... -a-new-spi, especially the SAMD51 section.
Dave
Dave
Please be positive and constructive with your questions and comments.