element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Safe and Sound
  • Challenges & Projects
  • Design Challenges
  • Safe and Sound
  • More
  • Cancel
Safe and Sound
Blog Safe&Sound: Wearable Tracking Device for Miners - 08: 320x240 TFT with MSP432
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: sunnyiut
  • Date Created: 5 Jul 2017 12:24 PM Date Created
  • Views 623 views
  • Likes 2 likes
  • Comments 1 comment
  • msp432_launchpad
  • ili9341
  • safe and sound design challenge
  • msp432p401r
  • tft display
Related
Recommended

Safe&Sound: Wearable Tracking Device for Miners - 08: 320x240 TFT with MSP432

sunnyiut
sunnyiut
5 Jul 2017

Title: Wearable Tracking Device for Miners

By: sunnyiut                               

Previous Blogs
01: Introduction02: The Kit
03: Review_MSP432P401R04: Review_430BOOST-SHARP96
05: Review_BOOSTXL-SENSORS06: Review_DLP7970ABP
07: Project proposal update

 

Design Challenge: Safe and Sound Wearables

Blog number: 08

 

 

Intro:

This blog is based on MSP432P401r and 320x240 pixel TFT display interface.

 

 

image

 

Objective:

 

According to my project proposal I have to design a wearable device mounted on the wrist of the Miners.

This wearable device consists of several sensors to collect environmental information.

The MSP432P401r MCU will collect the data from the sensors and display on the TFT.

 

In this blog post, I'll focus on

     - the interfacing of the TFT and the MSP432P401r MCU

     - display some dummy data to mimic the final system

 

Compiler:

 

MikroC pro for ARM - from MikroElektronika

 

Firmware:

Full source code and circuit diagram can be found in LIBSTOCK.

 

 

Display module:

 

I am using a TFT display for my project instead of the provided SHARP96 LCD, because I need a bigger display which is visible at low light.

 

This TFT display module has following features -image

     - 320x240 display resolution

     - ILI 9341 controller

     - 262.000 colours

     - Touch panel [not using for this project]

     - Back-light

     - 3.3V power supply voltage

 

It is interfaced with the MSP432P401r MCU via 8-bit parallel connection.

 

IM[3:0]----------INTERFACE MODE----------USED PINS

__________________________________________

0011 -----------8-BIT INTERFACE -----------DB[17:10]

 

 

Interfacing:image

 

// TFT module connections
char TFT_DataPort at DIO_P7OUT;
sbit TFT_RST at DIO_P9OUT.B2;
sbit TFT_RS at DIO_P9OUT.B6;
sbit TFT_CS at DIO_P9OUT.B7;
sbit TFT_RD at DIO_P9OUT.B4;
sbit TFT_WR at DIO_P9OUT.B5;
sbit TFT_BLED at DIO_P9OUT.B3;
char TFT_DataPort_Direction at DIO_P7DIR;
sbit TFT_RST_Direction at DIO_P9DIR.B2;
sbit TFT_RS_Direction at DIO_P9DIR.B6;
sbit TFT_CS_Direction at DIO_P9DIR.B7;
sbit TFT_RD_Direction at DIO_P9DIR.B4;
sbit TFT_WR_Direction at DIO_P9DIR.B5;
sbit TFT_BLED_Direction at DIO_P9DIR.B3;
// End TFT module connections

 

dependencies -

  • TFT librabry
  • TFT_def library

resources -

// Resources
const code char Nasalization_Rg22x23_Regular[];
const code char Tahoma19x19_Bold[];
const code char Tahoma11x13_Regular[];
const code char cover_screen_jpg[61813];
const code char screen1_jpg[50682];

 

CKT diagram:

 

imageimage

 

Display Initialization:

image

// Display Initialize
void DisplayInit() {
  //TFT_Init_ILI9341_8bit(320, 240);
  TFT_Init(320,240);
  TFT_BLED = 1;
  TFT_Fill_Screen(CL_BLACK);
  TFT_Set_Font(TFT_defaultFont, CL_WHITE, FO_HORIZONTAL);
  TFT_Set_Brush(1,CL_BLACK, 0, LEFT_TO_RIGHT, CL_BLACK, CL_BLACK );
}

void InitialDisplay() {
  TFT_Fill_Screen(CL_BLACK);

  TFT_Set_Font(Nasalization_Rg22x23_Regular, CL_GREEN, FO_HORIZONTAL);
  TFT_Write_Text("TFT display demo", 40, 40);
  
  TFT_Write_Text("________________", 40, 60);
  TFT_Set_Font(TFT_defaultFont, CL_WHITE, FO_HORIZONTAL);
  
  TFT_Write_Text("safe&sound", 135, 210);
  TFT_Set_Font(Nasalization_Rg22x23_Regular, CL_WHITE, FO_HORIZONTAL);

  }

 

 

Safe&Sound cover screen:

 

imageimage

 

 

Environmental Info screen with dummy data:

 

 

void cover_screen() {
  TFT_Image_Jpeg(0, 0, cover_screen_jpg);
  }

void screen1() {
  TFT_Image_Jpeg(0, 0, screen1_jpg);
  }


void demo_data() {

  IntToStr (light, text_temp);
  TFT_Write_Text(text_temp, 55, 45);
  TFT_Write_Text("LUX", 120, 45);
  
  IntToStr (ambient_tmp, text_temp);
  TFT_Write_Text(text_temp, 55, 130);
  TFT_Write_Text("'C", 115, 130);
  
  IntToStr (humidity, text_temp);
  TFT_Write_Text(text_temp, 170, 45);
  TFT_Write_Text("%", 220, 45);
  
  IntToStr (pressure, text_temp);
  TFT_Write_Text(text_temp, 140, 130);
  TFT_Write_Text("KPA", 190, 130);
  }

 

imageimage

 

That's the end of this blogpost. In my next blog, I'll interface the Ambient Light sensor OPT3001 and display the output data on TFT.

  • Sign in to reply

Top Comments

  • DAB
    DAB over 8 years ago +1
    Nice update, I look forward to seeing how fast the display can update. DAB
  • DAB
    DAB over 8 years ago

    Nice update,

     

    I look forward to seeing how fast the display can update.

     

    DAB

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube