Page 1 of 1

Text Display and/or Slide Drawing?

Posted: Sat Oct 26, 2024 8:34 pm
by mrlx
Would the Text Display and/or AutoCAD Slide Drawing examples from the Cortex M7 package port to the RP2040?

Re: Text Display and/or Slide Drawing?

Posted: Mon Oct 28, 2024 9:16 pm
by cfbsoftware
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.

Re: Text Display and/or Slide Drawing?

Posted: Sun Nov 03, 2024 5:41 am
by cfbsoftware
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;