Select Page

”Touchscreen Cellphone” – Interfacing STM32-LCD Development Board with GSM SIM-300 Modem

This project covers implementation of a few basic functions of a touchscreen cellphone like making a voice call, sending an SMS, playing a game etc.

Introduction

Objective : To interface STM32-LCD development board (with a resistive touchscreeon and a 320×240 LCD screen) with GSM modem SIM-300.

Here in this project, following features have been implemented :

  • Making a voice call with real time user input of phone no. using a resistive touchscreen.
  • Composing & sending an SMS to any desired phone no.
  • Receiving an incoming call.
  • Playing a game ( Tic Tac Toe ) in the device.
  • Developing a library of all LCD display functions of various screens and their corresponding touchscreen engines. ( i.e. related touchscreen functions to detect a key pressed and perform corresponding system functions. )
  • Making a generalized architecture to facilitate adding of new applications in future & linking them to the current functionality.

Hardware Details

STM32-LCD Development Board by OLIMEX

STM32-LCD is development prototype board with STM32F103ZE microcontroller from STMicroelectronics. This powerful microcontroller supports various serial interfaces such as USB, USART, SPI. In addition you will find also accelerometer, JTAG, TFT LCD, mini SD/MMC card connector on this board and most of the GPIOs are on extension headers where you can connect your additional circuits. All this allows you to build a diversity of powerful applications to be used in a wide range of situations.

 

STM32-LCD Development Board

 

 

 

 

 

 

 

 

Microcontroller – STM32F103ZE – high-performance ARM® Cortex™-M3 32-bit RISC core operating at a 72 MHz frequency, high-speed embedded memories (Flash memory – 512 Kbytes and SRAM – 64 Kbytes), and an extensive range of enhanced I/Os and peripherals connected to two APB buses.

 

GSM modem SIM-300

 

 

 

 

 

 

 

 

 

 

 

As shown in fig. the GSM modem used has a SIM-300 chip by SIMCom Wireless Solutions. Also this module has a UART & RS232 both to connect it to the system. It draws power from a 12V DC adapter.

 

System Description

 

 

 

 

 

 

 

 

As shown in fig. the STM32- LCD board is connected to GSM modem via USART1 port. The resistive touchscreen and LCD are already connected to the board. User input is received from the touchscreen. Output is displayed on the LCD to give visual feedback as per the input.

 

Block Diagram & Algorithm

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  • As shown in the fig. user can switch over between various application screens and come back to the menu or home screen.
  • Meanwhile, if an incoming call comes, it is notified to the system via a USART interrupt ( a dedicated fuction is developed to parse the incoming data in such a case & match it with different conditions ) & the system moves to the incoming call application.
  • A ‘launch_app’ function is developed that takes care of switching the display screens & loading its own touchscreen configuration engines along with it.
  • A debouncing mechanism is introduced that takes care of false triggering of touch input or multiple inputs & ensures a fail-safe & reliable interface to accept user input via the touchscreen.

Key Features

 

Home & Menu Screen

 

 

 

 

 

 

 

Provides access to various other applications.

 

Voice Call Dialing App.

 

 

 

 

 

 

 

 

SMS Sending App.

 

 

 

 

 

 

 

It can enter a phone no. , compose a message using a qwerty keypad & send the SMS.

 

Game App. – Tic Tac Toe

 

 

 

 

 

 

 

 

Tic Tac Toe game can be played in 2 players mode. It auto reloads until BACK is pressed.

Receiving an Incoming Call

The screen flashes & shows animations when an incoming call event happens & upon pressing END button, it goes to the home screen.

 

References

1. STM32-LCD Development Board User Manual, 2011, Olimex ltd.

2. SIM-300 AT Commands Set , 2006, SIMCOM ltd.

Project Team

  • Nilkanth Pathak (nilkanth.dese.iisc@gmail.com)
  • Prashuk Jain (prashuk.jain@gmail.com)