How to code LCDTFT on STM32F103RB Nucleo

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
coints111
 
Posts: 3
Joined: Wed Dec 29, 2021 1:52 am

How to code LCDTFT on STM32F103RB Nucleo

Post by coints111 »

I have bought a 2.8 TFT (ID:1651) and I want to connect the TFT to STM32F103RB Nucleo. Please help to tell me how to migrate the open source code to run STM32F1?
Thanks!

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: How to code LCDTFT on STM32F103RB Nucleo

Post by adafruit_support_mike »

It depends on how much of the code you want to use.

Our display libraries are based on a SPITFT class that's part of the GFX library. At minimum, display-specific libraries implement a .drawPixel() function that the GFX functions use to draw graphics primitives. Most display libraries also implement 'fast' functions that draw simple shapes like vertical and horizontal lines using code specifically for the display, and not going through the GFX primitive functions.

The GFX library also inherits the Print interface from the Arduino environment for handling text.

Porting the code to a new microcontroller is usually simple. At most, you should only need to modify the low-level functions that handle SPI communication between the microcontroller and the display. All of the other code is built on top of that, and should run on another microcontroller without needing any changes.

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”