Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /******************************************************************************
- * Title : MSP432 Microcontroller Interfacing With 16x2 LCD
- * Author : Taufiq Dwi Septian Suyadhi
- * Website : www.robotics-university.com
- *
- * Use the following pins:
- * - P4.2 = EN pin
- * - P4.0 = RS pin
- * - P4.4 - P4.7 = 4 bit data line
- *
- * configuration of pins/port can be modified in the .h file
- *
- * Library : lcd16x2_msp43x.h and lcd16x2_msp43x.c
- * Author : Haroldo Amaral - agaelema@globo.com
- * Date : 2017/12/28
- * URL : https://github.com/agaelema/LCD16x2_MSP43x
- *****************************************************************************/
- #include <msp432.h>
- #include <stdint.h>
- #include "lcd16x2_msp43x.h"
- void main(void)
- {
- WDT_A->CTL = WDT_A_CTL_PW | WDT_A_CTL_HOLD; // stop watchdog timer
- P4->DIR = 0xFF; // make P4 pins as output for data and controls
- P4->OUT = 0x00; // clear all pins
- lcd16x2_Init(); // initialize LCD
- lcd16x2_SetPosition(0,0); // set position to 1st row, 1st column
- lcd16x2_PrintString("Hi Taufiq!"); // write your text to lcd
- lcd16x2_SetPosition(1,0); // set position to 2nd row, 1st column
- lcd16x2_PrintString("Batam 2020"); // write your text to lcd
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement