rm-hull / luma.led_matrix

Python module to drive LED Matrices & 7-segment displays (MAX7219) and RGB NeoPixels (WS2812 / APA102)
https://luma-led-matrix.readthedocs.io
MIT License
521 stars 156 forks source link

Doesn't work with Dragonboard 410c #155

Open lmsb opened 6 years ago

lmsb commented 6 years ago

The display is all garbled. Library and python code examples run fine but actual LEDs display garbled.

rm-hull commented 6 years ago

Can you post details of:

lmsb commented 6 years ago

Hi @rm-hull ,

Thanks for your help,

Regards, Luis.

rm-hull commented 6 years ago

ok, things I would do:

lmsb commented 6 years ago

@rm-hull , I'm now suspecting that the problem is speed. I say this because I followed your advise and disconnected everything else not related with the SPI lines, then ran the matrix_demo and still no activity. Then, went and lowered the speed on the spi interface at the matrix_demo.py program and I could see the display with some activity. I tried to reduce the speed further but there's an assert under the "luma.core.interface.serial" library file which doesn't allow me to specify a value of Hz lower than 500,000. Question: Can I further reduce the speed here? how? Suspected about the speed first because I'm using a voltage level shifter because the SPI in DB410c outputs at 1.8v while the max7219 display works at 5v. And based on this forum entry I found that we must use a lower speed when shifting from/to 1.8v.

I checked the specs on the DB410c board and the Raspberry pi and the DB410c has a higher clock speed than the Rpi2 but has the same as the Rpi3. But even so, according to this link, the DB410c still remains faster than the Rpi3 under different performance tests.

Another test I did was to use the spidev_test utility and all looked ok as after bridging the MOSI and MISO with a wire I was able to confirm the looped data.

Thanks again for your help.

lmsb commented 6 years ago

@rm-hull ,

Would you have a basic set of byte commands to be used with the spidev_test to drive the max7219 LED display ?

thanks, Luis.