Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 05:54 12 Jun 2025 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 : oled screen whit i2c how do i activate it scl=Pin(17), sda=Pin(16))

Author Message
tenij000
Newbie

Joined: 30/05/2025
Location: Netherlands
Posts: 9
Posted: 06:19am 08 Jun 2025
Copy link to clipboard 
Print this post

gnd t0 gnd
3v3 to 3v3
scl=Pin(17), sda=Pin(16))

how do i activate it whit picomite version 6
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2535
Posted: 07:54am 08 Jun 2025
Copy link to clipboard 
Print this post

The first step is to find out what controller chip it has. In the manual there is a chapter on display panels. After SPI displays are the I2C displays. See if your chip is listed there.
The only OLED I can see is this:-
  Quote  To setup the system I2C bus use the command:
OPTION SYSTEM I2C sdapin, sclpin

OPTION LCDPANEL SSD1306I2C, OR [,offset]
Initialises a OLED display using the SSD1306 controller with an I2C interface. This supports 128 * 64 resolution.
An additional parameter offset may be specified to control the position of the display. 0.96" displays typically
need a value of 0. 1.3" displays typically need a value of 2. Default if omitted is 0.
NB many cheap I2C versions of SSD1306 displays do not implement I2C properly due to a wiring error. This
seems to be particularly the case with 1.3" variants
OPTION LCDPANEL SSD1306I2C32, OR
Initialises a OLED display using the SSD1306 controller with an I2C interface. This supports 128 * 32 resolution
 
tenij000
Newbie

Joined: 30/05/2025
Location: Netherlands
Posts: 9
Posted: 09:16am 08 Jun 2025
Copy link to clipboard 
Print this post

> OPTION RESET
> OPTION SYSTEM I2C GP18,GP19
> OPTION LCDPANEL SSD1306I2C32
Error : Argument count
> OPTION LCDPANEL SSD1306I2C32,P

then get 2 real thin lines at the left side of the screen from top to buttom

but i can draw a line 0,0,60,60 seems to work TENSTAR ROBOT 1,3 "OLED-displaymodule
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7735
Posted: 10:13am 08 Jun 2025
Copy link to clipboard 
Print this post

You might need the offset argument to get rid of the thin lines. I don't know, I've never used it and I haven't got one of those displays.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
dddns
Guru

Joined: 20/09/2024
Location: Germany
Posts: 450
Posted: 10:38am 08 Jun 2025
Copy link to clipboard 
Print this post

This has a SH1106 and not a SSD1306
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10158
Posted: 11:15am 08 Jun 2025
Copy link to clipboard 
Print this post

The OP doesn't say what version they are running. I made changes recently to support a much wider range of oled display controllers following help from another TBS member
 
dddns
Guru

Joined: 20/09/2024
Location: Germany
Posts: 450
Posted: 11:21am 08 Jun 2025
Copy link to clipboard 
Print this post

  tenij000 said  
but i can draw a line 0,0,60,60 seems to work TENSTAR ROBOT 1,3 "OLED-displaymodule

He did, that's why I answered..sorry
 
tenij000
Newbie

Joined: 30/05/2025
Location: Netherlands
Posts: 9
Posted: 09:12am 09 Jun 2025
Copy link to clipboard 
Print this post

if wane upgrade do think the display whit a driver ili9341v whill work ?
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7735
Posted: 09:25am 09 Jun 2025
Copy link to clipboard 
Print this post

The ILI9341 is a different sort of display, using a SPI interface. It has a colour display.

The Tenstar Robot 1.3" display uses the SH1106, with a I2C interface. It only has a single colour OLED display.

The two displays are completely different. :)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
dddns
Guru

Joined: 20/09/2024
Location: Germany
Posts: 450
Posted: 10:31am 09 Jun 2025
Copy link to clipboard 
Print this post

  tenij000 said  if wane upgrade do think the display whit a driver ili9341v whill work ?

I don't think it is supported but I can't say for sure
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7735
Posted: 11:13am 09 Jun 2025
Copy link to clipboard 
Print this post

The ILI9341 is supported in MMBasic. It's 320x240 and is, sort of, the "standard" SPI display.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
tenij000
Newbie

Joined: 30/05/2025
Location: Netherlands
Posts: 9
Posted: 10:30pm 10 Jun 2025
Copy link to clipboard 
Print this post

PicoMite MMBasic RP2350A Edition V6.00.02RC26
OPTION FLASH SIZE 4194304
OPTION COLOURCODE ON
OPTION CPUSPEED (KHz) 150000
OPTION SDCARD GP13, GP10, GP11, GP12

used for the sd card

what are the pins that need to connect if dont use the touch of the  ili9341
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2535
Posted: 12:08am 11 Jun 2025
Copy link to clipboard 
Print this post

See Display Panels p57 in the V6.00.02 draft manual.
A typical example is:
OPTION SYSTEM SPI CLK-pin, MOSI-pin, MISO-pin
eg
OPTION SYSTEM SPI GP18, GP19, GP16

OPTION LCDPANEL ILI9341, Orientation, DC, RESET, CS(Chip Select) [,LED (Back Light brightness)] [,INVERT colours] '[] are optional.
If not using brightness control connect the LED pin on the panel to 3.3V
Older panels (v1.1) don't have transistor Q1 to drive the LEDs so must not be connected to a GP pin. Connect LED pin to 3.3V via a 100Ω to 220Ω resistor.
eg
OPTION LCDPANEL ILI9341, LANDSCAPE, GP15, GP14, GP13, GP20 'use any free pins for these

Leave these touch pins disconnected T_IRQ, T_DO, T_DIN, T_CLK
and connect T_CS to 3.3V (via a 10kΩ resistor would allow you to use touch in the future)

You can save some SD card pins by sharing the SPI bus.
First remove your current configuration with
OPTION SDCARD DISABLE
then
OPTION SDCARD GP22 'SD_CS - chip select can be any free GP pin
connect SD_CLK to GP18, SD_MOSI to GP19, SD_MISO to GP16

Also see page 64 Example SPI LCD Panel Configuration
Edited 2025-06-11 10:09 by phil99
 
dddns
Guru

Joined: 20/09/2024
Location: Germany
Posts: 450
Posted: 05:35am 11 Jun 2025
Copy link to clipboard 
Print this post

  Mixtel90 said  The ILI9341 is supported in MMBasic. It's 320x240 and is, sort of, the "standard" SPI display.


I know..I own one. But these seem to be different. Can you say that the "V" version will work?
The upgrade adopts lPS full view panel, with good visual angle

Edited 2025-06-11 15:36 by dddns
 
dddns
Guru

Joined: 20/09/2024
Location: Germany
Posts: 450
Posted: 05:50am 11 Jun 2025
Copy link to clipboard 
Print this post

This  is interesting too, but it's driven with ST7796 "U" ..I don't know
Edited 2025-06-11 15:52 by dddns
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7735
Posted: 06:57am 11 Jun 2025
Copy link to clipboard 
Print this post

No idea. Until someone tries one we won't know. :)

As far as I know the *chip* specifications are the same, but that's only half the story. It's how it's used for this display.
.
Edited 2025-06-11 16:58 by Mixtel90
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
tenij000
Newbie

Joined: 30/05/2025
Location: Netherlands
Posts: 9
Posted: 07:34am 11 Jun 2025
Copy link to clipboard 
Print this post

OPTION LCDPANEL ILI9341, L, GP10, GP11, GP12, GP13, GP14, GP15  

  gnd:gnd
  vcc:3v3
  GP10: SCK pin
  GP11: MOSI pin
  GP12: MISO pin
  GP13: CS pin
  GP14: DC/RS pin
  GP15: RESET pin
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4975
Posted: 08:00am 11 Jun 2025
Copy link to clipboard 
Print this post

Hi tenij000,

Below is a schematics, and associated OPTION settings where the PicoMite connects to a SPI LCD, and SPI SD card, and SPI TOUCH, using a ILI9341 panel.

This is copied from the Game*Mite.

Your hardware may connect different to different GPIO pins, but this should get you on your way. Note that the SPI pins (MISO/MOSI/SCLK) must be connected to a SPI pair on the PicoMite.







Thank Tom and Mick for designing this.

Volhout
PicomiteVGA PETSCII ROBOTS
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7735
Posted: 08:17am 11 Jun 2025
Copy link to clipboard 
Print this post

VCC, GND, SCK, MOSI and MISO are common to all three. They are three separate devices on the same SPI bus, but each has additional pins for it's own use.

The display requires CS, RESET, DC and LED
The SDcard requires SD_CS
Touch requires T_CS and T_IRQ

You can actually use any combination of the three devices by just connecting the required pins. If you don't want Touch then simply don't connect T_CS or T_IRQ and don't use OPTION TOUCH to configure it.

Additionally, the SDcard can optionally use its own SPI bus or a "bitbanged" SPI that can use any available pins but has slightly lower performance. It may as well share the display SPI though as you only need to supply a pin for SD_CS.

(Not this Mick for the above design. :) )
Edited 2025-06-11 18:18 by Mixtel90
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
tenij000
Newbie

Joined: 30/05/2025
Location: Netherlands
Posts: 9
Posted: 08:36am 11 Jun 2025
Copy link to clipboard 
Print this post

CLK  MOSI  MISO
OPTION SYSTEM SPI GP18, GP19, GP16

                                    DC   RESET  CS    BACKLIGHT
OPTION LCDPANEL ILI9341, LANDSCAPE, GP15, GP14, GP13, GP20

> OPTION LIST
PicoMite MMBasic RP2040 Edition V6.00.02RC26
OPTION SYSTEM SPI GP18,GP19,GP16
OPTION COLOURCODE ON
OPTION CPUSPEED (KHz) 200000
OPTION LCDPANEL ILI9341, LANDSCAPE,GP15,GP14,GP13,GP20
>
 
Print this page


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

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025