ATxmega128A1 Driving Oled Display ST7735

by sergei_iliev in Circuits > Microcontrollers

26 Views, 0 Favorites, 0 Comments

ATxmega128A1 Driving Oled Display ST7735

IMG_20251028_120345_HDR.jpg
IMG_20251028_120436_HDR.jpg
IMG_20251028_101659_HDR.jpg

This project demonstrates building a simple driver task for an OLED lcd screen using Web Serial API and Acorn micro-kernel operating system. Screen content is controled by a Web Browser app using Web Serial API to send image form desktop to ST7735 screen. Driver task supports both text and image mode. ATxmega128A1 uses one of its SPI channels to transfer text/image data to the display.


Components

  1. Olimex microcontroller development prototype board for ATXMEGA128A1
  2. Microchip/AVR Studio program to build and flush the project source code
  3. OLED display ST7735
  4. TTL Serial Port Converter Module DB9 Connector For Olimex
  5. Web Browser to access OLED Editor App
  6. DB9 RS232 cable to connect Olimex serial port to PC serial port


Software

Build Project From Source Code

Firmware project is based on acorn micro kernel operating system driving 3 separate tasks

  1. task controlling RS232 communication byte stream with PC computer
  2. task dealing with OLED SPI protocol communication



  1. Download source code from github repo - xmega128-oled-st7735
  2. Find and open project file xmega-kernel_2.0.asmproj in Microchip AVR Studio
  3. Build project to generate HEX file
  4. Flash Hex file using ISP port (There are tones of articles on how to do this) I am using AVRISP programmer


Web Browser Editor App

Navigate to OLED Editor App and click Connect button to connect to Olimex dev board. Default baud rate is 9600 , Data Size: 8-bit ; Parity: None ; Stop Bits: 1 ; Flow Control: Off.

Description of header buttons

  1. Escape or Cancel - resets drawing operation
  2. Draw - free style bixel by pixel drawing
  3. Eraser - remove pixes from canvas
  4. Clear Canvas
  5. Load Image - load and display on canvas png image. Image must be 128x64 to fit the screen and will be converted to 1 bit per pixel image.
  6. Load Icon - load from predefined embedded in app icons
  7. Select Drawing Color

Description of Bottom buttons

  1. Connect - open Serial RS232 communication channel
  2. Disconnect
  3. Update OLED - send all canvas pixel or image changes to OLED display screen.
  4. Clear OLED