STM32F103ZET6 board comes with 3.2 inch graphical LCD which features an ILI9320 controller. Equipped LCD is capable of displaying 252144 colors when driven in 18-bit mode. We are gonna drive it in 16-bit mode, so we are limiting it to 65K colors. LCD driver is based on existing code found on internet which was originally developed for STM3210E board. Only minor modifications were needed like assigning right control pins.
In previous example we implemented a simple demo program that reads buttons by constantly checking their status in main program loop. Obviously this isn’t efficient and convenient way to do that. Imagine your program has to do lots of tasks and in between you also need to check button status – mission becomes impossible unless you use interrupts. In this part we briefly introduce to STM32F10x interrupt system and write example code where LEDs and buttons are serviced within interrupts. ARM Cortex-M3 microcontrollers have advanced interrupt system that is pretty easy manageable. All interrupts are controlled inside Nested Vectored Interrupt Controller (NVIC) which is close to Cortex core to ensure low latency and robust performance. Main features of NVIC include: