-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Matrix on SPI1 vs SPI0 #221
Comments
Hi I want to use my LED Matrix to display the temp of a MAX6675 Module with a Thermocouple. The MAX6675 will use SPI0 and I need to have the LED Matrix using SPI1. I've been trying to figure this out can you help? Thanks |
Instead of defining a serial object as you would normally do:
Now you do it like this:
Please note that the bitbanging method is slower, as the interface is via software, but the advantage is that you can use any of your unused GPIO pins. If you need more information, check the docsting of the bitbang class: |
Ok, I found a way to use SPI1. First check if you have SPI1 enabled. This is done in the terminal with the command All SPI ports and devices should be displayed. If not, it is necessary to activate it. In the terminal type The default SPI1 pins are as follows:
If you wish, you can also change the pin of CS0 by adding now check again if SPI1 is already there with in the spi object, in the port parameter you will put P (in this case 1 of SPI1) and in device you will put D (as in this example we only enable 1 CS, the value is 0).
References: |
Hi this is a bit of a Noob Question but I am hoping that you can give me some direction on how to configure the matrix to run on SPI1 instead of SPI0
I have the same problem on both a Raspberry Pi3 and and PiZero W.
Type of Raspberry Pi
Pi 3 and Pi zero
Linux Kernel version
I am running 4.18.97-v7+ #1294 as my kernel.
Expected behaviour
I am able to get the Max7219 8x8 matrix working properly, however I need to add another SPI device (RC422 RFID Reader) and the two do not seem to want to work sharing the CS pin (pin 24).
(Text on the Max7219 gets garbled and stilted and theRC422 does not work)
From my research (and limited knowledge) I understand that I should be able to move to CS1 (PIN 26) and this in theory should solve my issue.
I am using this as my initialization code for the Max7219:
Actual behaviour
I have tried changing port=1, and device=1 but neither results in anything appearing on the matrix.
port=1 ==> "SPI Device Not Found"
device=1 ==> No error raised, but matrix does not update.
Edit -- I have continued to try to get this working (without any success) I understand that I have to toggle the value on CS to LOW for any SPI device that I want to activate. I have tried manually forcing the GPIO to high and low between the RC522 and the Max7219 but that doesn't appear to do anything.
Anyone who can help with this problem I would be extremely grateful as I am stumped on my project until I can get past this blocking issue.
The text was updated successfully, but these errors were encountered: