Experimental project to drive a TFT LCD with an AVR MCU and avr-libc

@Torsten RΓΆmer Torsten RΓΆmer authored on 28 Nov 2023
GitHub committed on 28 Nov 2023
cats Add emojis πŸ™‚ (#2) 2 years ago
nbproject Small improvements 2 years ago
.gitignore Project setup 2 years ago
CODE_OF_CONDUCT.md Initial commit 2 years ago
LICENSE Initial commit 2 years ago
Makefile Add emojis πŸ™‚ (#2) 2 years ago
README.md Add emojis πŸ™‚ (#2) 2 years ago
avrtft.c Add emojis πŸ™‚ (#2) 2 years ago
bitmaps.c Add emojis πŸ™‚ (#2) 2 years ago
bitmaps.h Add emojis πŸ™‚ (#2) 2 years ago
bmp.c Upload BMP images via USART (#1) 2 years ago
bmp.h Upload BMP images via USART (#1) 2 years ago
cmd.c Add emojis πŸ™‚ (#2) 2 years ago
cmd.h Add emojis πŸ™‚ (#2) 2 years ago
display.c Add emojis πŸ™‚ (#2) 2 years ago
display.h Small improvements 2 years ago
font.c Initial commit 2 years ago
font.h Add emojis πŸ™‚ (#2) 2 years ago
hack.c Add emojis πŸ™‚ (#2) 2 years ago
hack.h basics are working 2 years ago
pins.h Upload BMP images via USART (#1) 2 years ago
spi.c Initial commit 2 years ago
spi.h Initial commit 2 years ago
tft.c Add emojis πŸ™‚ (#2) 2 years ago
tft.h Add emojis πŸ™‚ (#2) 2 years ago
types.h Add emojis πŸ™‚ (#2) 2 years ago
usart.c Upload BMP images via USART (#1) 2 years ago
usart.h Upload BMP images via USART (#1) 2 years ago
utils.h Initial commit 2 years ago
README.md

AVRTFT

Simple project to drive a TFT LCD like the
Adafruit 1.8" Color TFT LCD 160x128 ST7735R
with an AVR MCU (ATmega328P) and avr-libc.

Currently implemented:

  • Mostly complete UTF-8 set (code points U+0000 to U+00FF) of Hack font
    with antialiasing (4-Bit greyscale)
  • Draw strings in Hack
  • Draw bitmaps (emojis)
  • Write text and bitmaps via USART
  • Upload BMP images via USART (16-Bit (5/6/5) RGB)
  • Logging via USART

The AVR is clocked with a crystal for reliable communication via USART.

Ideas:

  • Read pictures from SD Card
  • Display 4K@50Hz videos...

IMG_20231125_011054

Write something via USART

Connect to the controller with for example GTKTerm (38400 Baud).
Write some text and a bitmap, and upload a BMP image:

c 0xffff // clear display
d // display the demo
t 0 0 Just some text // write text in Hack to row 0 column 0
b 0 112 0 // write bitmap with index 0 ('blush' emoji) to row 0 column 112
p 0 0 // prepare to "stream" a 16-Bit (5/6/5) RGB BMP image