DM-TFT18-101

DM-TFT18-101

Description

The DM-TFT18-101 display module, specifications and other resources are available from DisplayModule.com.

  • 1.77"
  • SD-card slot
  • 262K color depth
  • 128x160
  • SPI interface
  • 2 LED backlit

The display module has a 40-pin connector and requires a shield (DM-ADTAU-001) to be compatible with Arduino pinning.

Pinning

The following pins are used (not including GND and VCC) when connected to the DM-ADTAU-001 adapter:

Arduino PinFunction
D2SPI MOSI for display
D3SPI SCLK for display
D4ChipSelect for display
D5Display Data/Command 1)
D6Display Reset
D10ChipSelect for SD Card and Touch Detect pin 2)
D11SPI MOSI for SD Card
D12SPI MIS0 for SD Card
D13SPI SCLK for SD Card

1) For LPC1549 some hardware settings are needed. Look at http://www.displaymodule.com/pages/mbed for details.

2) The functionallity of the D10 pin is controlled with the slider on the DM-ADTAU-001 adapter board. It must be in the SD_CS position for SD Card to work. The DM-TFT18-101 does not have touch support so the T_IRQ position just disables SD Card.

Compatibility

The display module has been tested with the following platforms:

PlatformComment
LPCXpresso1549Add comment
EA LPC4088 QuickStart Board
with a LPC4088 QSB Base Board
Add comment

Software

There is a library to get you started with the displays:

Import libraryDmTftLibrary

Driver Library for our displays

To use the library:

main.cpp

#include "mbed.h"

#include "DmTftHX8353C.h"

DmTftHX8353C tft;  /* DM_TFT18_101 */

int main() {
  tft.init();
  tft.drawString(20, 20, "x:");
  tft.drawString(100, 20, "y:");
  while(true) {
    ...
  }
}


To use the SD Card include the SDFileSystem library in your project and initialize like this:

main.cpp

#include "mbed.h"

#include "DmTftHX8353C.h"
#include "SDFileSystem.h"

/* Displays with adapter */
#define DM_PIN_CS_SDCARD     D10
#define DM_PIN_SD_SPI_MOSI   D11
#define DM_PIN_SD_SPI_MISO   D12
#define DM_PIN_SD_SPI_SCLK   D13

DmTftHX8353C tft;  /* DM_TFT18_101 */

SDFileSystem sd(DM_PIN_SD_SPI_MOSI, DM_PIN_SD_SPI_MISO, DM_PIN_SD_SPI_SCLK, DM_PIN_CS_SDCARD, "sd"); // mosi,miso,clk,cs

DigitalInOut csSDCard(DM_PIN_CS_SDCARD, PIN_OUTPUT, PullUp, 1);

int main() {
  const char* fname = "/sd/logop565.bmp";

  tft.init();
  
  while (true) {
    FILE *fp = fopen(fname, "r");
    if (fp != NULL) {
      ...
    }
  }
}


There are also some demo programs:

Import programdm_sdcard_with_adapter

Shows how to use a display and the onboard SD Card. Requires a display module with an adapter

Import programdm_main

Shows how to use the display. Draws a bitmap from internal flash, some geometric shapes and some text

Import programdm_bubbles

Shows how to use the display. Draws circles that bounce around on the display.


1 comment on DM-TFT18-101:

22 May 2016

does anyone have a simple, mbed only version for the DM TFT18-101 display? I'm new to all this and it's driving me crazy

Please log in to post comments.