Jump to content

Luma.OLED on NanoPi Duo with SPI?


sgjava

Recommended Posts

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
    },

 

Link to comment
Share on other sites

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?

 

 

spi_oled.jpg

Link to comment
Share on other sites

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

Link to comment
Share on other sites

@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

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines