AVR128DA32 Driving SH1107 Display Using Web Image Editor
by sergei_iliev in Circuits > Microcontrollers
34 Views, 0 Favorites, 0 Comments
AVR128DA32 Driving SH1107 Display Using Web Image Editor
The main goal of the project is to show how to draw images on OLED display SH1107 using Web Serial API and Acorn micro-kernel operating system.
Web OLED browser editor app was develop to run online (no need to install any programm localy on desktop) and communicate pixel changes over web serial api directly to an AVR processor running acorn micro kernel. The processor sends changes over I2C protocol to OLED display and pixel changes are displayed instantly on screen.
Components
- AVR128DA32 adaptor board
- Microchip/AVR Studio program to build and flush the project source code
- OLED display SH1107 128x128 resolution
- TTL Serial Port Converter Module DB9 Connector For Arduino
- Web Browser to access OLED Editor App
- DB9 RS232 cable to connect Arduino serial port to PC serial port
Connect SH1107 OLED Display to AVR128DA32
Connect wires SDA(Blue wire), and SCL(White wire) from I2C OLED Display to PA2 and PA3 AVR128DA32 ports
Connect wires TxD(Orange wire) and RxD(Yellow wire) from DB9 TTL Serial Adaptor to PA0 and PA1 AVR128DA32 ports
Connect Serial Adaptor cable to PC Com Port
Build Project From Source Code
Firmware project is based on acorn micro kernel operating system driving 2 separate tasks
- Task controlling RS232 communication byte stream with PC computer
- Task dealing with OLED I2C protocol communication
- Download source code from github repo - oled_1107
- Find and open project file mega-kernel_2.0.asmproj in Microchip AVR Studio
- Build project to generate HEX file
- Flash Hex file using UPDI programmer
Web Browser Editor App
Navigate to OLED Editor App and click Connect button to connect to Arduino NANO. Default baud rate is 57600 , Data Size: 8-bit ; Parity: None ; Stop Bits: 1 ; Flow Control: Off.
Description of header buttons
- Escape or Cancel - resets drawing operation
- Draw - free style bixel by pixel drawing
- Draw Line
- Draw Circle
- Eraser - remove pixes from canvas
- Clear Canvas
- Load Image - load and display on canvas png image. Image must be 128x128 to fit the screen and will be converted to 1 bit per pixel image.
- Load Icon - load from predefined embedded in app icons
Description of Bottom buttons
- Connect - open Serial RS232 communication channel
- Disconnect
- Update OLED - send all canvas pixel or image changes to OLED display screen.
- Clear OLED