sgjava Posted December 23, 2017 Posted December 23, 2017 OK, folks, I have I2C working for Luma.OLED, but now I'm trying an SPI display (SSD1331) and having some issues. I modified OPi.GPIO pin mappings as follows (see below), but I'm wondering if my SPI configuration is correct. I'm using overlays=spi-spidev and param_spidev_spi_bus=1, but I'm wondering if I should also be using CS1 configuration as well since I'm using SPI bus 1 (bus 0 is reserved for flash). i.e. param_spidev_spi_cs=1 and overlays=spi-add-cs1. I only ask this because the Luma.OLED instructions say "Because CS is connected to CE0, the display is available on SPI port 0. You can connect it to CE1 to have it available on port 1. If so, pass port=1 in your serial interface create call." I tried it without the CS settings and nothing happens on the display. # NanoPi Duo physical pin to actual GPIO pin BOARD: { 3: 12, # I2C0_SDA/GPIOA12 5: 11, # I2C0_SCL/GPIOA11 7: 203, # GPIOG11 8: 198, # UART1_TX/GPIOG6 10: 199, # UART1_RX/GPIOG7 11: 5, # DEBUG_RX(UART_RXD0)/GPIOA5/PWM0 12: 363, # GPIOL11/IR-RX 13: 4, # DEBUG_TX(UART_TXD0)/GPIOA4 19: 15, # UART3_RTS/SPI1_MOSI/GPIOA15 21: 16, # UART3_CTS/SPI1_MISO/GPIOA16 23: 14, # UART3_RX/SPI1_CLK/GPIOA14 24: 13 # UART3_TX/SPI1_CS/GPIOA13 }, # NanoPi Duo BCM pin to actual GPIO pin BCM: { 2: 12, # I2C0_SDA/GPIOA12 3: 11, # I2C0_SCL/GPIOA11 4: 203, # GPIOG11 8: 13, # UART3_TX/SPI1_CS/GPIOA13 9: 16, # UART3_CTS/SPI1_MISO/GPIOA16 10: 15, # UART3_RTS/SPI1_MOSI/GPIOA15 11: 14, # UART3_RX/SPI1_CLK/GPIOA14 14: 198, # UART1_TX/GPIOG6 15: 199, # UART1_RX/GPIOG7 17: 5, # DEBUG_RX(UART_RXD0)/GPIOA5/PWM0 18: 363, # GPIOL11/IR-RX 27: 4 # DEBUG_TX(UART_TXD0)/GPIOA4 },
sgjava Posted December 28, 2017 Author Posted December 28, 2017 I figured it out. I had it wired to MI instead of MO! I'll do a write up once I have everything working the way I want. 2
berbec Posted July 19, 2018 Posted July 19, 2018 sgjava, I saw your post here and on the I2C display. Could you provide a write-up for this true n00b about getting it work with SPI? I think I have the same display module you do. (yes that's the i2c version in the background) I'm trying to get a PaPiRus Zero to work with a non-raspberry device. The Banana Pi M2Zero seems perfect, but.... well... Sinovoip software and support. What can you do?
sgjava Posted July 23, 2018 Author Posted July 23, 2018 Take a look at https://bbs.nextthing.co/t/chip-mini-oled-display-luma-oled-chiptimus-prime/15673 Even though it was for the CHIP it should give you the directions to get an I2C and SPI display up. For Duo and SPI: @Larry Bank has optimized display drivers for a few displays as well, but I'm not sure they are SPI.
@lex Posted July 23, 2018 Posted July 23, 2018 (edited) edit: sorry, should be SPI. Edited July 23, 2018 by @lex wrong answer
berbec Posted July 25, 2018 Posted July 25, 2018 On 7/23/2018 at 7:08 PM, @lex said: edit: sorry, should be SPI. Yeah i've got the i2c display working. My BPZ doesn't seem to like me. I'm trying another i2c display and may just be happy with that. @sgjava Thanks for that link! I'll give it a go once I have a free microsd card. I need to load up next microcenter run
sgjava Posted July 25, 2018 Author Posted July 25, 2018 @berbec I2C mono displays are fast enough for text, etc. I was also able to drive I2C at 28 FPS playing video. The down side is you have to overclock I2C and CPU utilization is higher than an SPI display. For a color display you pretty much have to use SPI. See https://bbs.nextthing.co/t/chip-mini-oled-display-luma-oled-chiptimus-prime/15673/19
Recommended Posts