Text Display and/or Slide Drawing?

Download new library modules and examples to use with Astrobe for RP2040 and RP2350. Forum members can also upload their own source code examples.
Post Reply
mrlx
Posts: 12
Joined: Sun Oct 20, 2019 6:22 pm

Text Display and/or Slide Drawing?

Post by mrlx » Sat Oct 26, 2024 8:34 pm

Would the Text Display and/or AutoCAD Slide Drawing examples from the Cortex M7 package port to the RP2040?

cfbsoftware
Site Admin
Posts: 525
Joined: Fri Dec 31, 2010 12:30 pm
Contact:

Re: Text Display and/or Slide Drawing?

Post by cfbsoftware » Mon Oct 28, 2024 9:16 pm

What you need to do is modify any calls to SPI.Init (SPI0 / SPI1?) and Timers.Init (-> TIM0), and to modify the pin configuration code in the display driver module ST7735.ConfigurePins to suit the Pi Pico.

We are planning to test this ourselves as part of the Astrobe for RP2350 final tests early next week and will report back here if you haven't had any success by then.

cfbsoftware
Site Admin
Posts: 525
Joined: Fri Dec 31, 2010 12:30 pm
Contact:

Re: Text Display and/or Slide Drawing?

Post by cfbsoftware » Sun Nov 03, 2024 5:41 am

The following connections between the Pi Pico and the AdaFruit 160x128 TFT display breakout board have been tested successfully:

Code: Select all

       Display  Pi Pico 
       -------  -------    
       Gnd       3. GND     
       VCC      36. 3V3 (OUT)
       RESET     9. GP6     
       D/C      10. GP7 
       -
       CS       12. GP9
       MOSI     15. GP11    
       SCK      19. GP14  
       -  
       LITE     20. GP15     
The corresponding procedures in the RP2040 display driver module ST7735.mod are:

Code: Select all

  (* ========================================================================= *)
  PROCEDURE ConfigurePin(VAR pin: GPIO.Pin; alternateFunction: INTEGER);
  VAR
    config: GPIO.PortConfiguration;
  BEGIN
    config.mode := GPIO.Mode_Out;
    config.alternateFunction := alternateFunction;
    GPIO.Configure(pin, config)
  END ConfigurePin;

  (* ========================================================================= *)
  PROCEDURE ConfigurePins;
  BEGIN
    pinRESET.no := 6;
    pinDC.no    := 7;
    pinCS.no    := 9;
    pinMOSI.no  := 11;
    pinSCK.no   := 14;
    pinLITE.no  := 15;
    ConfigurePin(pinRESET, GPIO.FSIO);
    ConfigurePin(pinDC,    GPIO.FSIO);
    ConfigurePin(pinSCK,   GPIO.FSPI);
    ConfigurePin(pinCS,    GPIO.FSPI);
    ConfigurePin(pinMOSI,  GPIO.FSPI);
    ConfigurePin(pinLITE,  GPIO.FSIO)
  END ConfigurePins;


Post Reply