Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 12:46 29 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : SSD1306 1.3" OLED Display on SPI

Author Message
asknik2022
Regular Member

Joined: 26/03/2022
Location: United Kingdom
Posts: 92
Posted: 06:46pm 19 Mar 2023
Copy link to clipboard 
Print this post

 
asknik2022
Regular Member

Joined: 26/03/2022
Location: United Kingdom
Posts: 92
Posted: 06:50pm 19 Mar 2023
Copy link to clipboard 
Print this post

Can anyone please help

I am trying to setup a 1.3" OLED display using SPI

I have a ILI9341 SPi working on these settings:
OPTION SYSTEM SPI GP18,GP19,GP16
OPTION LCDPANEL ILI9341, PORTRAIT,GP15,GP14,GP13

if I try and use the SSD1306 on SPI with these settings I dont get any display
option system spi gp18,gp19,gp16
option lcdpanel ssd1306spi,P,gp15,gp14,gp13,2

Any Ideas
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9308
Posted: 11:23pm 19 Mar 2023
Copy link to clipboard 
Print this post

Are you trying to use two displays on the same SPI pins, or just the 1306?
Can you link us to the 1306 module you are using?
Many of those 1306 modules can work as either I2C or SPI interface - do you have the correct type, or is it configured for the SPI bus?

Just stabbing at ideas for now, but a link to the 1306 LCD panel you are trying to use would be helpful, as they are not all wired up the same way.
Smoke makes things work. When the smoke gets out, it stops!
 
asknik2022
Regular Member

Joined: 26/03/2022
Location: United Kingdom
Posts: 92
Posted: 07:23am 20 Mar 2023
Copy link to clipboard 
Print this post

Hi I am only using one display the one display at a time.
I am actually wanting to replace the ILI9341 with the SSD1306

I purchased two of these SSD1306's and they both arrived configured as SPI
I converted one of them to I2C and that works perfectly.

However I want to use the I2C for a RTC and hence would rather use SPi for the Display as I have already done using the ILI9341.
Pics below



 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2141
Posted: 07:32am 20 Mar 2023
Copy link to clipboard 
Print this post

It should be possible to get the RTC and display to share I2C, unless the addresses conflict.
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6814
Posted: 07:37am 20 Mar 2023
Copy link to clipboard 
Print this post

I've used a RTC and a SSD1306I2C display on the same bus on my PicX board design. Works fine, there's no address conflict. :)  I've used the same display with both the tiny and bigger RTC modules.
Edited 2023-03-20 17:38 by Mixtel90
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
asknik2022
Regular Member

Joined: 26/03/2022
Location: United Kingdom
Posts: 92
Posted: 08:13am 20 Mar 2023
Copy link to clipboard 
Print this post

I would rather keep the SSD1306 on SPI as I already have pcb boards made etc.

I am using these on a Raspberry pi pico under mmbasic
This is the pinout is have used between the pico and the display.
GND >> GND
VCC >> VCC (tried 5v and 3.3v)
SCLK >> GP18
SDI(MOSI)>>GP19
SDO(MISO) >> GP16 (not used) (Just configured for option system spi)
RESET >> GP14
DC >> GP15
CS >> GP13

ps.. If I have no option then how do I setup RTC and Display on I2C
If I setup the RTC with option system I2C then I cannot use the grahpic commands on I2C2 as I can't configure both via option system commands. (not that I know of)
I am currently iusing GP0,GP1 for the RTC on I2C
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9139
Posted: 08:23am 20 Mar 2023
Copy link to clipboard 
Print this post

  Quote  If I have no option then how do I setup RTC and Display on I2C


Just connect them both to GP0,GP1. With the option SYSTEM I2C set it will all work once you configure OPTION LCDPANEL

Sorry haven't got a SPI SSD to test. The code is in there from other ports and did work in the past.
Edited 2023-03-20 18:25 by matherp
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6814
Posted: 08:51am 20 Mar 2023
Copy link to clipboard 
Print this post

I have a 0.96" SSD1306I2C and it works (from 3V3) with:

OPTION SYSTEM I2C GP14. GP15
OPTION LCDPANEL SSD1306I2C, RP
OPTION RTC AUTO ENABLE

Sorry, I've never used the SPI version. I'd assumed that it "Just Worked". I've not spotted anything odd in the setup so far.
Edited 2023-03-20 18:54 by Mixtel90
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
asknik2022
Regular Member

Joined: 26/03/2022
Location: United Kingdom
Posts: 92
Posted: 09:04am 20 Mar 2023
Copy link to clipboard 
Print this post

Thanks Guys for all your help
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024