element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • 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
  • About Us
  • 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
Embedded and Microcontrollers
  • Technologies
  • More
Embedded and Microcontrollers
Blog Low Power Compact LCD example for the EasyL1105 MSPM0 board
  • Blog
  • Forum
  • Documents
  • Quiz
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Embedded and Microcontrollers to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Jan Cumps
  • Date Created: 10 Oct 2025 11:32 AM Date Created
  • Views 82 views
  • Likes 7 likes
  • Comments 5 comments
  • MSPM0L1105
  • lcd
  • MSPM0
  • easyL1105
  • texas instruments
Related
Recommended

Low Power Compact LCD example for the EasyL1105 MSPM0 board

Jan Cumps
Jan Cumps
10 Oct 2025
Low Power Compact LCD example for the EasyL1105 MSPM0 board

Port of  Building a Low Power Compact LCD Display to TI's MSPM0 controller. I use  EasyL1105: A Dev Board for the TI ARM Cortex-M0+ L-Series . This port can be used on any MSPM0 launchpad or board.

image

LCD

It's a low power 3 character i2c display. There is no backlight. It uses reflected ambient light.

Ref Code Mnfr Part #
LCD1 1838930 LCD-S301C31TR

Check the original post for the schematic, PCB and BOM.

Connections

Only power and i2c is needed. The EasyL1105 has the necessary pull-up resistors.

signal LCD board MSPM0 EasyL1105
GND 1 J1-1
I2C SDA 2 SDA/PA0 J1-8
I2C SCL 3 SCL/PA1 J11-7
3V3 4 and 5 J1-11

MSPM0 configuration

This only needs the i2c peripheral. I'm using buffered FIFO, transmit only.

image

image

I managed to get the clock up to 800 kHz, and it still worked reliable. I haven't checked yet how (or if) I can configure the controller to go to 1 MHz.

Software

We just need a simple send-only i2c conversation. The only changes I've made to the original code, is

  • replace Linux i2c commands with those of the MSPM0 driver library.
  • use  efficient sprintf() string format lib for lower range microcontrollers to replace the standard lib's sprintf().

#include "printf.h"

/* I2C Target address */
#define LCD_ADDR  (0x38)

// Four possible values for DEVICE_ADDRESS
// R1   R2   R3   R4   DEVICE_ADDRESS
// Fit       FIT       0x60
//      Fit  Fit       0x61
// Fit            Fit  0x62
//      Fit       Fit  0x63

// Commands (these can be 'continued' by setting the MSB
// jc20161120 R1 and R4 mounted on my board
#define DEVICE_ADDR 0x62
#define BLINK_OFF 0x70
#define BANK_CMD 0x78

// BANK_CMD bit values
#define WR_BANK_A 0x00
#define WR_BANK_B 0x02
#define DISP_BANK_A 0x00
#define DISP_BANK_B 0x01

// ...

void i2c_write(int address, unsigned char* buf, unsigned int length) {
    // Fill FIFO with data. This example will send a MAX of 8 bytes since it
    // doesn't handle the case where FIFO is full
    DL_I2C_fillControllerTXFIFO(I2C_INST, buf, length);

    // Wait for I2C to be Idle 
    while (!(
        DL_I2C_getControllerStatus(I2C_INST) & DL_I2C_CONTROLLER_STATUS_IDLE))
        ;

    // Send the packet to the controller.
    // This function will send Start + Stop automatically.
    DL_I2C_startControllerTransfer(I2C_INST, address,
        DL_I2C_CONTROLLER_DIRECTION_TX, length);

    // Poll until the Controller writes all bytes 
    while (DL_I2C_getControllerStatus(I2C_INST) &
           DL_I2C_CONTROLLER_STATUS_BUSY_BUS)
        ;

    // Trap if there was an error 
    if (DL_I2C_getControllerStatus(I2C_INST) &
        DL_I2C_CONTROLLER_STATUS_ERROR) {
        __BKPT(0);
    }

    // Wait for I2C to be Idle 
    while (!(
        DL_I2C_getControllerStatus(I2C_INST) & DL_I2C_CONTROLLER_STATUS_IDLE))
        ;

    // Add delay between transfers 
    // delay_cycles(1000);
}

// ...

int main(void)
{
    SYSCFG_DL_init();

    int i;
    double v;
    unsigned char text[4];
    char_prog_t *progval;
    unsigned char mode, device, bank, blinkmode;

    mode=0xc9; // Set static mode, display enabled, continuation enabled
    device=DEVICE_ADDR | 0x80; // Select the device, continuation enabled
    bank=BANK_CMD | 0x80 | WR_BANK_A | DISP_BANK_A; 
    blinkmode=BLINK_OFF | 0x80;
    buf[0] = mode;
    buf[1] = device;
    buf[2] = blinkmode;
    buf[3] = bank;
    buf[4] = 0x00; // pointer

    while (true) {
      for (i = 0; i < 1000; i++) {
        sprintf(text, "%3d", i);
        print_line(text);
        // if (i == 101) {
        //   delay_cycles(100000); 
        // }
      }
    }
    return 0;  
}

I disabled floating point and exponential format in the printf lib, to reduce code size. 

PRINTF_SUPPORT_EXPONENTIAL_SPECIFIERS=0
PRINTF_SUPPORT_DECIMAL_SPECIFIERS=0

image

The LCD, and software, can render numbers with decimal point. If you want to use that, remove the above 2 symbol definitions.
You can then format the LCD text with: 

sprintf(text, "%4.1f", v);

although it's just a 3 digit display, it can be used in some interesting low power applications. 

In a sensor based application, you could make an interface with this display and some buttons. Each button representing an attribute. When you hold the button, the LCD can show the related attribute or value. E;G.: a design that always is in deep sleep, except when it needs to take a sample, or when you press a button to get info...

The only time it consumes significant energy is when setting or changing a value. Keeping that value on display costs almost nothing.

The full code, with binaries (both bootloader and debugger/programmer), is attached: i2c_lcd_EasyL1105_20251010.zip

Thank you for reading.

Related posts

  • Sign in to reply
  • Jan Cumps
    Jan Cumps 13 hours ago in reply to shabaz

    there are options:

    - the i2c can be woken up with a timer (e.g, refresh the display every half second, by waking up both GPIO and i2c, then sending data to the LCD)

    - wake up with a gpio pin (button), and immediately send i2c to the display then

    , ...

    once the LCD is written to, its power consumption is close to the leakage current of a coin cell. Very low. It may be worth pulling up the i2c pins by a GPIO ...

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • scottiebabe
    scottiebabe 14 hours ago

    Great work. Do you have an edit button on, too?

    image

     Documents  

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • shabaz
    shabaz 16 hours ago in reply to Jan Cumps

    I was just thinking, the LCD current is so low, the LCD could also be powered from a GPIO if desired : ) That way if the microcontroller goes to sleep, then so does any LCD consumption. 

    EDIT: Not sure what would need to be done with the I2C lines however.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps 16 hours ago

    Sometimes you need a little luck. The size of the data buffer to be sent to the LCD, by coincidence, is exactly the same as the size of the MSPM0 FIFO buffer for i2c.

    There's no drama if they aren't the same. But in this case, I should be able to optimize this for a best case scenario. Both for power and performance.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • shabaz
    shabaz 18 hours ago

    Hi Jan,

    Nice work! That's a great setup for a very-low-current and low-cost display solution. 

    And good to see how I2C is configured and used with the MSPM0. 

    • Cancel
    • Vote Up 0 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