Skip to content

hunterhedges-zz/I2cLcd

Repository files navigation

I2C LCD Library for MSP432

Easily setup and control a 16x2 LCD screen using an I2C interface!

                             5V   5V
                             /|\  /|\
             MSP432P401     ~10k ~10k     LCD with I2C
               Master         |    |         Slave
          -----------------   |    |   -----------------
         |     P1.6/UCB0SDA|<-|----+->|SDA              |
         |                 |  |       |                 |
         |                 |  |       |                 |
         |     P1.7/UCB0SCL|<-+------>|SCL              |
         |                 |          |                 |

To Try The Example

  1. Connect Pin 1.6 on MSP432 to LCD SDA with a pullup resistor (around 10KOhm).

  2. Connect Pin 1.7 on MSP432 to LCD SCL with a pullup resistor (around 10KOhm).

  3. Connect to MSP432 using USB and a serial connection application like Tera Term at 9600 baud.

  4. Writing to the MSP432 will then pass characters to the LCD when the enter key is pressed.

Special Functions:

These must be typed in all CAPS

HAPPY
Displays a happy face

HEART
Displays a heart

DUCK
Displays a duck

HOME
Moves the cursor to first position

CLEAR
Clears the screen and moves cursor home

DISPLAYON
Turn on the display

DISPLAYOFF
Turn off the display

CURSORON
Turns on the cursor

CURSOROFF
Turns off the cursor

BLINKON
Turns cursor blinking on

BLINKOFF
Turns cursor blinking off

SHIFTLEFT
Shifts all text one to left

SHIFTRIGHT
Shifts all text one to right

TEXTTORIGHT
Text will be written left to right

TEXTTOLEFT
Text will be written right to left

AUTOSCROLLON
Shifts all text each character written

AUTOSCROLLOFF
Moves cursor when a character is written

BACKLIGHTON
Turns on the backlight

BACKLIGHTOFF
Turns off the backlight

About

I2C LCD library for MSP432 example project

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published