Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 22:12 31 Mar 2026 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 : Raspberr PI SPI problem

Author Message
EXAL81
Newbie

Joined: 05/08/2025
Location: United Kingdom
Posts: 11
Posted: 10:19am 31 Mar 2026
Copy link to clipboard 
Print this post

Hello.
I have built a project using a Raspberry pi (2040), an LCD panel and an RF transceiver  
module.
The display responds correctly to the "GUI TEST LCD PANEL" instruction, so is OK.
Which PICO pins to use for the display SPI where copied from an article in Practical Electronics mag, called "Raspberry PI Pico BacKPack".
Since I thought it would be the correct thing to do, I used the same set of pins for the RF module, so that only one SPI interface would be used.
But when I come to run my PICO basic, I get "ERROR PIN 24/GP18 IS RESERVED ON STARTUP".
The only possible clue that I have is that the OPTION LIST includes :
"SYSTEM SPI GP18,GP19,GP16. I definitely did not set that myself, so I don't know how it got there or what it is for.
Please can any help.
 
dddns
Guru

Joined: 20/09/2024
Location: Germany
Posts: 813
Posted: 11:00am 31 Mar 2026
Copy link to clipboard 
Print this post

Please post the output of Option list and have a look at manual page 62. If you want to talk to a SPI based RF Transceiver you need to open a second SPI channel..manual 210
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3099
Posted: 11:04am 31 Mar 2026
Copy link to clipboard 
Print this post

From the latest manual, Display Panels p62.
  Quote  System SPI Bus
The system SPI bus is a dedicated SPI channel which is used by many LCD panels, all touch controllers and also to communicate with a SD Card. If any of these are attached the I/O pins used for the system SPI bus must be defined first.
This is done using this command:
OPTION SYSTEM SPI CLK-pin, MOSI-pin, MISO-pin
This must be entered at the command prompt and will cause the firmware to restart and disconnect the USB console interface, which will need to be reconnected. This option will be reapplied on startup and the pins will be reserved and not be available for other uses.
A typical example is:
OPTION SYSTEM SPI GP18, GP19, GP16
Note that the speed of drawing to SPI based displays and accessing SD cards is not affected by the CPU speed.


System SPI is setup for the LCD, Touch and the SD card and I don't think it can be used for non-system devices.

  Options, p110 said  OPTION SYSTEM SPI CLKpin, MOSIpin, MISOpin
or
OPTION SYSTEM SPI DISABLE
 Specify or disable the SPI port and pins for use by system devices (SD Card, LCD panel, etc).
The PicoMite firmware uses a specific hardware SPI port for system devices, leaving the other for the user. This command specifies which pins are to be used, and hence which of the SPI ports is to be used.
The pins allocated to the SYSTEM SPI will not be available to other MMBasic commands.
This command must be run at the command prompt (not in a program)
 
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 2026