Tag Archives: spi

A Basic Touch-screen driver for STM32

Today I completed the basic touch screen driver. The task included Learning the "Theory of Operation" of 4 wire resistive touch screens. Learning the about the working of AD7843 touch screen controller IC. Learning about the SPI peripheral of STM32 Writing basic SPI drivers (to init, read and write to SPI1) Writing basic drivers to command and read AD7843 touch screen controller. Filtering the touchscreen data using Median Filter to remove noise. Learning about the three point touch screen calibration method. Writing a routine to convert touch screen co-ordinate (ranges from 0-4095 in X and Y direction) to LCD co-ordinates. Finally ploting a cross-hair at the touched point. The final result is shown below. Then I moved on to implement a GUI 3D Button. After that I went to try a “Free Hand Drawing” application. And what I made is shown in the video below.

Synchronous Serial Communication Tutorial – The Basics of I2C and SPI.

This tutorial give you the details of synchronous serial communication, which is the basis of data transfer in communication standards like SPI and I2C. The tutorial is aimed for a beginner who has no experience or any idea of serial communication. So intermediate user who already has some idea about serial data transfer can skip this tutorial and jump directly to SPI or I2C tutorials. Data Transfer. Knowledge of data transfer is very important for any embedded system developer. In any embed ed system data is moved between several units like between RAM and CPU. There are many methods and technique for data transfer each having its own pros and cons. So different data transfer technique is used in different situations. Some example of data transfer are Simple parallel transfer. (Used to transfer 8,16,32 … bits of data in the same time) Asynchronous Serial Transfer (USART) – Old but still in use mode of serial communication using only 2 lines (+1 additional line for GND). SPI – Serial Peripheral Interface – Standard Mode of communication between different ICs. Many ICs designed for a Variety of Jobs like Flash Memory, LCD controller, Ethernet Controllers etc uses this standard for communication. So if you want to use any of these functionality you need to have a knowledge of SPI. IIC(or I2C) – […]