Confusion with SPI LCD panel


Author Message
apalert
Regular Member

Joined: 06/07/2023
Location: Australia
Posts: 47
Posted: 04:46am 06 Feb 2024      

Attempting to setup a ST7735S SPI LCD panel on Picomite

Correct me if I'm wrong but from the manual I gleaned the process as:


At command prompt:
OPTION SYSTEM SPI CLKpin, MOSIpin, MISOpin
OPTION LCDPANEL ST7735S, OR, DC, RESET, CS [,offset]

In code:

SETPIN rx, tx, clk, SPI


I suspect all 3 of those lines refer to the same 3 pins but using different naming conventions and not necessarily in the same order.

Any help will be appreciated!

Mal

TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6543
Posted: 05:55am 06 Feb 2024      

Displays are configured from the commandline and then they are 'permanent' until the options are reset.

the DC, RESET and CS pins referred to in the second OPTION are in addition to the SYSTEM SPI pins and all 6 pins are needed.

The display will use the SYSTEM SPI pins.

Jim

apalert
Regular Member

Joined: 06/07/2023
Location: Australia
Posts: 47
Posted: 06:26am 06 Feb 2024      

Thanks Jim

And with the last line, SETPIN rx, tx, clk, SPI I'm guessing that:

rx = MOSIpin
tx = MISOpin
clk = CLKpin

TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6543
Posted: 06:33am 06 Feb 2024      

MOSI is 'Master Out Slave In' which I would call tx

phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3319
Posted: 06:47am 06 Feb 2024      

As noted by Jim  'SETPIN rx, tx, clk, SPI' isn't needed as OPTION SYSTEM SPI takes care of that every time the Pico boots.

On many panels their Rx is labelled SDI and connects to MOSI = Tx on the Pico
and their Tx is labelled SDO and connects to MISIO = Rx on the Pico.

Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5991
Posted: 07:50am 06 Feb 2024      

You only need this:



Volhout

apalert
Regular Member

Joined: 06/07/2023
Location: Australia
Posts: 47
Posted: 08:35am 08 Feb 2024      

Thanks everyone for your help. Got it running today :)