GUI for ARM MCU with touchscreen LCD display
January 8, 2013
 
This is a simple GUI (graphical user interface) that I have developed for an ARM MCU with touchscreen TFT LCD. ARM MCU used is the NXP LPC2148 ARM7 MCU running on 60Mhz with 32kB of RAM memory and 512kB of flash memory. LCD is a 3.2" 320x240 pixels TFT LCD with a resistive touchscreen.
Since there is not enough RAM on MCU for a whole image to be created inside memory before rendering it on screen, image is split into 8x8 squares and each square holds a reference to an object that will be rendered in that square. Object can be a single plain color square, a text or a bitmap image stored in MCU flash memory. Image is rendered on screen one square at a time using the referenced objects. For instance a button is made out of eight objects, four corner bitmaps and four side bitmaps stored in MCU flash memory. When rendering a button, referenced bitmap is copied directly from flash memory to LCD avoiding the usage of RAM memory.



The setup is made with a breadboards and a few adapters. MCU is visible in the upper part of the photo connected with two flat cables to a bradboard. LCD is also connected to bradboard with flat cables and wired to MCU with jumper wires. Cable going off the image is a power supply and the RS-232 connection used for programming the MCU.


Project source code is available on https://github.com/matijaspanic/gui-for-arm-mcu


Tags: ARM
Comments


Leave a comment