Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 23:24 21 Nov 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 : RGB(x,y,z) - Red and Blue swapped?

Author Message
Nimue

Guru

Joined: 06/08/2020
Location: United Kingdom
Posts: 425
Posted: 05:36pm 05 Feb 2023
Copy link to clipboard 
Print this post

PicoMite MMBasic Version 5.07.06
OPTION SYSTEM SPI GP10,GP11,GP28
OPTION COLOURCODE ON
OPTION LCDPANEL ST7735, RLANDSCAPE,GP8,GP12,GP9,GP13

Using: Waveshare 1.44

Link to Waveshare board

The panel is a ST7735S -- but if I initialise with ST7735S the screen resets to random noise.  Using ST7735 seems to work.  The panel is 128x128.

Interestingly sometimes when the board fires up, there is a x1 pixel row at the bottom showing a random selection of colours which only goes away if I OPTION RESET and setup the LCDPANEL again.

The LCD panel works fine - coordinate wise.  But RGB(100,0,0) draws in BLUE and RGB(0,0,100) draws in RED.   RGB(0,100,0) draws in green as expected.

Have I lost the plot or am I missing something?

Cheers
N
Entropy is not what it used to be
 
Nimue

Guru

Joined: 06/08/2020
Location: United Kingdom
Posts: 425
Posted: 05:46pm 05 Feb 2023
Copy link to clipboard 
Print this post

Update --- the following sequence is reporducabel (at least for me).

Option RESET


OPTION SYSTEM SPI GP10,GP11,GP28
OPTION COLOURCODE ON
OPTION LCDPANEL ST7735, RLANDSCAPE,GP8,GP12,GP9,GP13

-- Works Fine

Power cycle the Pico >>> Bottom row of random pixels.

Then:
Option RESET
OPTION SYSTEM SPI GP10,GP11,GP28
OPTION COLOURCODE ON
OPTION LCDPANEL ST7735, RLANDSCAPE,GP8,GP12,GP9,GP13

Still garbled bottom row.

Power cycle.
Option RESET
OPTION SYSTEM SPI GP10,GP11,GP28
OPTION COLOURCODE ON
OPTION LCDPANEL ST7735, L,GP8,GP12,GP9,GP13

No random pixels.

Power cycle -- random pixels (this time at the top row).

What seems to "clear" the random pixels is to toggle the settings on the orientation - then the first time is fine --- until a power cycle when the random pixels are back (either top row -- when orientation is "L" or bottom row -- when orientation is "RL")

As the panel is square will investigate "P" for orientation....

Any ideas or is my panel duff....?

Cheers
N
Entropy is not what it used to be
 
Nimue

Guru

Joined: 06/08/2020
Location: United Kingdom
Posts: 425
Posted: 05:53pm 05 Feb 2023
Copy link to clipboard 
Print this post

Update 2

It also appears that it is 1pixel out --

pixel 1,1 draws outside the lcdpanel
pixel 1,2 draw upper left (when in RL orientation).

Same behaviour when orientation set to "P".

Cheers
N
Edited 2023-02-06 03:59 by Nimue
Entropy is not what it used to be
 
Nimue

Guru

Joined: 06/08/2020
Location: United Kingdom
Posts: 425
Posted: 09:13am 06 Feb 2023
Copy link to clipboard 
Print this post

Final update...

Digging into the Wiki for the Waveshare I find this....

"ST7735S is a 132*162 pixel LCD controller, and this product is a 128*128 pixel LCD, so some processing has been done on the display: the display starts from the second pixel in the horizontal direction, so that the display can be guaranteed. At that time, the position corresponding to the RAM in the LCD is consistent with the actual position."

So that explains the pixel offset and the "processing" / references to positions in RAM (on the LCD) probably explains the slight incompatibility.  

Moral of the story --- read the Wiki before you buy "non standard" parts ;-)

Cheers
N
Entropy is not what it used to be
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10632
Posted: 09:17am 06 Feb 2023
Copy link to clipboard 
Print this post

If you want to loan me the display I can create a variant of the driver to suit.PM me if interested
 
Nimue

Guru

Joined: 06/08/2020
Location: United Kingdom
Posts: 425
Posted: 09:40am 06 Feb 2023
Copy link to clipboard 
Print this post

  matherp said  If you want to loan me the display I can create a variant of the driver to suit.PM me if interested


I really appreciate the offer - am conscious of adding to your commitments with something that might be niche --- I suppose semi custom panels will keep popping up and its impossible to keep them all compatible (or even desirable).

My use case (as most are) is to use in class somehow -- possibly to build a "simple" data logger.

Have PM'd

Diolch as we say in Wales.
Entropy is not what it used to be
 
TrevorH
Senior Member

Joined: 06/04/2018
Location: United Kingdom
Posts: 145
Posted: 10:17am 06 Feb 2023
Copy link to clipboard 
Print this post

Hi, Nimue, you do realise that there are 3 versions of the ST7735 display, RED tab, GREEN tab and BLACK tab all of which require slightly different initialisation.

Just a thought!!!!

Trevor
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4147
Posted: 10:29am 06 Feb 2023
Copy link to clipboard 
Print this post

  TrevorH said  there are 3 versions of the ST7735 display, RED tab, GREEN tab and BLACK tab all of which require slightly different initialisation.

Trevor

Sorry to be dim but where are they? All I see is the one linked to (or similar but non-1.44 ones).

John
Edited 2023-02-06 20:30 by JohnS
 
Nimue

Guru

Joined: 06/08/2020
Location: United Kingdom
Posts: 425
Posted: 11:58am 06 Feb 2023
Copy link to clipboard 
Print this post

  TrevorH said  Hi, Nimue, you do realise that there are 3 versions of the ST7735 display, RED tab, GREEN tab and BLACK tab all of which require slightly different initialisation.

Just a thought!!!!

Trevor


FWIW - they are GreenTabs.

N
Entropy is not what it used to be
 
Nimue

Guru

Joined: 06/08/2020
Location: United Kingdom
Posts: 425
Posted: 12:00pm 06 Feb 2023
Copy link to clipboard 
Print this post

  JohnS said  
  TrevorH said  there are 3 versions of the ST7735 display, RED tab, GREEN tab and BLACK tab all of which require slightly different initialisation.

Trevor

Sorry to be dim but where are they? All I see is the one linked to (or similar but non-1.44 ones).

John


The tabs refer to the tab colour on the screen protector when shipped -- its not shown online ;-)

(Least I hope that is what it is ;-) )

N
Entropy is not what it used to be
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4147
Posted: 02:27pm 06 Feb 2023
Copy link to clipboard 
Print this post

No wonder I didn't know & searches hadn't helped!

John
 
TrevorH
Senior Member

Joined: 06/04/2018
Location: United Kingdom
Posts: 145
Posted: 02:45pm 06 Feb 2023
Copy link to clipboard 
Print this post

I only know this as I have met this before when programming using Arduino, the Adafruit libraries for these panels have different initialisations depending on Tab colour and of course size, I don't know if MMBasic has different options for them.

Peter, over to you

Trevor
 
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