HMI Intelligent TFT screen - control via serial, $4



  • I bought these 'HMI intelligent' displays which can be controlled via software serial. The reason is I wanted to use the I2C pins for analog sensors.

    alt text

    They're really interesting.

    • $4 for the 1.77" 1.8" 128*160 version.
    • $7 for the 2.4" 320*240 version.
    • Full color
    • 4 wires
    • Software serial, so you can connect it to any pins you have left.
    • Has built in memory that you can upload images to. Built in fonts too.
    • Built in shape drawing function. Very cool for dataviz.
    • Nice mounting holes.
    • Screen can be rotated, brightness can be adjusted, etc.
    • Does not need external power supply.

    Downsides:

    • Viewing angles are mediocre: you can still read it from an angle, but colors do shift.
    • When you create shapes and text using the commands, you can only use the 15 built in colors.
    • The smallest font size is still relatively big if you're used to the pixel fonts on the tiny OLED screens.

    Because all the functionality is already built into the screen, you don't need any libraries to drive it. Just serial commands. That saves a lot of memory.

    In theory there are touch screen versions too.

    The 2.4" version is impressive. It's twice the size, practically twice the resolution, and the screen fills the entire PCB.

    alt text

    GETTING STARTED

    This page has lots of details:
    http://www.spotpear.com/index.php/uart-lcd/uart-lcd-22

    It also has a link to a word document that has a walkthrough.

    Here's some example code:

    #include <SoftwareSerial.h>
    
    SoftwareSerial mySerial(6,7); // RX, TX
    
    void setup() {
      mySerial.begin(115200);
      delay(1000);
      mySerial.print("CLR(1);"); // set the background color to red
      mySerial.print("VER;"); // built in function to display the firmware version of the screen.
      mySerial.println("DCV16(3,32 ,hello world, 2);"); // displays 'hello world' in green (color 2) letters, 32 pixels from the top of the screen, and 3 pixels from the left. The new line tells the screen to execute all the commands it has received. This takes one or two milliseconds.
      delay(100);
    }
    

 

265
Online

7.8k
Users

8.7k
Topics

93.0k
Posts