Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
TFT_eSPI
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
TFT_eSPI
Commits
b2e0bd85
Unverified
Commit
b2e0bd85
authored
Oct 12, 2022
by
Bodmer
Committed by
GitHub
Oct 12, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete pio_16bit_parallel.pio
parent
48499856
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
76 deletions
+0
-76
Processors/pio_16bit_parallel.pio
Processors/pio_16bit_parallel.pio
+0
-76
No files found.
Processors/pio_16bit_parallel.pio
deleted
100644 → 0
View file @
48499856
// Raspberry Pi Pico PIO program to output data to a TFT
// controller via a 16 bit 8080 style data path.
// Original sourced from:
// https://github.com/zapta/pio_tft
// Side set: 1 output pin, TFT_WR. Active low.
// Data set: 16 consecutive output pins, TFT_D0 .. TFT_D15
.program tft_io
.side_set 1 opt ; The TFT_WR output.
// The C++ code switches between the different SM routines
// by waiting for the SM to be idle and setting its PC.
// The default SM routine is a 16 bit transfer
// Do a block fill of N+1 pixels.
public block_fill:
// Fetch colour value.
pull side 1
// Move colour to x.
mov x, osr
// Fetch pixel count N (sends N+1 pixels).
pull
// Move pixel count to y.
mov y, osr
next:
// Copy colour value into osr, colour in LS 16 bits.
mov osr, x side 1
// Output colour 16 bits, unwanted top 16 bits shifted through.
out pins, 32 side 0 [1]
// Decrement pixel count and loop.
jmp y--, next side 1
.wrap_target
// Transmit an 8 bit value (LS 8 bits of 32 bits).
public start_8:
// Transmit a 16 bit value (LS 16 bits of 32 bits).
public start_tx:
// Fetch the next 32 bit value from the TX FIFO and set TFT_WR high.
pull side 1
// Write the 16 bits and set WR low. This also
// shifts the unused top 16 bits through.
out pins, 32 side 0 [1]
// Set WR high and jump back to start.
jmp start_tx side 1
// Transmit a set window command sequence.
public set_addr_window:
// Loop count in x (to send caset, paset and ramwr commands).
set x, 2 side 1
pull_cmd:
// Set TFT_DC low.
set pins, 0
// Fetch caset, paset or ramwr.
pull
// Output LS byte (caset, paset or ramwr), discarding top 16 bits, set TFT_WR low.
out pins, 32 side 0
// Jump to end if 3rd cmd byte ramwr sent (x == 0)
jmp !x, end_set_addr
// pull next start and end coordinates, TFT_WR high.
pull side 1
// Set TFT_DC high.
set pins, 1
send_xy:
// Output byte, TFT_WR low.
out pins, 8 side 0 [1]
// Loop until 4 bytes sent, TFT_WR high.
jmp !osre, send_xy side 1 [1]
end_set_addr: // Jump here since delay needed before DC change
// Loop back for next command and write last command.
jmp x--, pull_cmd side 1
// Set DC high.
set pins, 1
// Auto-wrap back to start_tx.
.wrap
\ No newline at end of file
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