Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
st7789_mpy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
st7789_mpy
Commits
f31c12af
Commit
f31c12af
authored
Apr 13, 2022
by
russhughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Scrolling methods description
parent
93c60b26
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
0 deletions
+46
-0
README.md
README.md
+46
-0
No files found.
README.md
View file @
f31c12af
...
...
@@ -572,6 +572,52 @@ I was not able to run the display with a baud rate over 40MHZ.
The module exposes predefined colors:
`
BLACK
`, `
BLUE
`, `
RED
`, `
GREEN
`, `
CYAN
`, `
MAGENTA
`, `
YELLOW
`, and `
WHITE
`
## Scrolling
The st7789 display controller contains a 240 by 320-pixel frame buffer used to store the pixels for
the display. For scrolling, the frame buffer consists of three separate areas; The (`
tfa
`) top fixed
area, the (`
height
`) scrolling area, and the (`
bfa
`) bottom fixed area. The `
tfa
` is the upper portion of
the frame buffer in pixels not to scroll. The `
height
` is the center portion of the frame buffer in
pixels to scroll. The `
bfa
` is the lower portion of the frame buffer in pixels not to scroll. These
values control the ability to scroll the entire or a portion of the display.
Displays that are 320 pixels high, setting the `
tfa
` to 0, `
height
` to 320 and `
bfa
` to 0 will allow
scrolling the entire display. You can set the `
tfa
` and `
bfa
` to a non-zero value to scroll a portion of
the display. `
tfa
` + `
height
` + `
bfa
` = should equal 320, otherwise the scrolling mode is undefined.
Displays less than 320 pixels high, the `
tfa
`, `
height
`, and `
bfa
` will need to be adjusted to compensate
for the smaller LCD panel. The actual values will vary depending on the configuration of the LCD
panel. For example, scrolling the entire 135x240 TTGO T-Display requires a `
tfa
` value of 40, `
height
`
value of 240, and `
bfa
` value of 40 (40+240+40=320) because the T-Display LCD shows 240 rows starting
at the 40th row of the frame buffer, leaving the last 40 rows of the frame buffer undisplayed.
Other displays like the Waveshare Pico LCD 1.3 inch 240x240 display require the `
tfa
` set to 0, `
height
`
set to 240, and `
bfa
` set to 80 (0+240+80=320) to scroll the entire display. The Pico LCD 1.3 shows 240 rows
starting at the 0th row of the frame buffer, leaving the last 80 rows of the frame buffer undisplayed.
The `
vscsad
` method sets the (VSSA) Vertical Scroll Start Address. The VSSA sets the line in the
frame buffer that will be the first line after the `
tfa
`.
The ST7789 datasheet warns:
The value of the vertical scrolling start address is absolute (with reference to the frame memory),
it must not enter the fixed area (defined by Vertical Scrolling Definition, otherwise undesirable
image will be displayed on the panel.
- `
vscrdef(tfa, height, bfa)
` Set the vertical scrolling parameters.
`
tfa
` is the top fixed area in pixels. The top fixed area is the upper portion of the display
frame buffer, not scrolled.
`
height
` is the total height in pixels of the area scrolled.
`
bfa
` is the bottom fixed area in pixels. The bottom fixed area is the lower portion of the
display frame buffer not scrolled.
- `
vscsad(vssa)
` Set the vertical scroll address.
`
vssa
` is the vertical scroll start address in pixels. The vertical scroll start address is the
line in the frame buffer that will be the first line after the TFA.
## Helper functions
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment