Serial UART Interface for 16x2 LCDs

Serial UART Interface
for 16x2 LCDs
Allows you to interface any 16x2 LCD by UART of microcontroller or
USB-TTL adapter and send serial characters for display over LCD.
Sunrom Part#
1425
User's
Manual
Doc Version: 1
10-May-16
A quality product, proudly made in India by
Electronics
http://www.sunrom.com/m/1425
1425 Serial UART Interface for 16x2 LCDs
Table of Contents
Introduction .................................................................................................................................... 3
Typical Application ......................................................................................................................... 3
Features .......................................................................................................................................... 3
Interfacing with Microcontroller or USB-UART TTL..................................................................... 3
Specifications .................................................................................................................................. 4
Module Pin Details.......................................................................................................................... 4
Status LED ...................................................................................................................................... 4
Interfacing Packet Format .............................................................................................................. 4
Board Schematic ............................................................................................................................. 5
Baud Rate Setting Jumper .............................................................................................................. 6
Product Dimensions ....................................................................................................................... 6
Support ............................................................................................................................................7
Disclaimer ........................................................................................................................................7
Page 2/7 Doc Version: 1 10-May-16
http://www.sunrom.com/m/1425
1425 Serial UART Interface for 16x2 LCDs
Introduction
The PCB gets connected to back of standard 16x2 LCD and provides a serial UART interface.
Typical Application
MCU UART TX-OUT
OR
Sunrom Part# 1425
16x2 LCD
UART LCD Interface
PC with USB-TTL
Features
•
•
•
•
•
•
•
5V Operating voltage
Standard UART interface, TTL(3-5V) logic level.
LEDs for data and power indication
Stable, small size, easier mounting.
On board jumper to select 9600 or 115200 baud rate
LCD contrast adjust preset
High speed microcontroller on board.
Interfacing with Microcontroller or USB-UART TTL
If you want to operate with microcontroller then it's very simple to connect just 3 pins of
modules like below.
If you want to operate with a PC then use a typical USB-UART of TTL level(not RS232) with
same connections like below.
Microcontroller
USB-UART TTL
Part# 1425
GND
GND
5V
+3/5V
TX N.C.
RX
Page 3/7 Doc Version: 1 10-May-16
TXD
http://www.sunrom.com/m/1425
1425 Serial UART Interface for 16x2 LCDs
Specifications
Parameter
Working Voltage
Current Consumption
Serial Baud rate
Baud rate format
On Board controller
Value
5V DC regulated power supply
100 mA
9600 bps or 15200 bps depending on jumper setting
8-N-1; 1 Start bit, 8 Data bits, 1 Stop Bits, No Parity
STM8S003F3
Module Pin Details
Pin
GND
VCC
TX
RX
Details
Common Ground
Regulated positive power input 5V DC
This pin is not used in this application and can be left floating
Receive Input - UART TTL level - Connects to TXD pin of microcontroller
Interfacing Packet Format
We have kept interfacing format as simple as possible.
LCD Line Identifier
'1' or '2' ASCII character
Message
Up to 16 ASCII characters
Terminator
10 or 13 decimal which is ASCII
key code for Enter Key
Status LED comes on during the packet reception
To display a text for example Welcome on 1st Line send serial data like 1Welcome<Enter>
To display a text for example Test on 2nd Line send serial data like 2Test<Enter>.
1<Your Message><Enter>
2<Your Message><Enter>
Enter key code can be 10 or 13 decimal which is ASCII standard characters.
In your microcontroller code it can typically look like
printf("1Welcome\n");
printf("2Test\n");
If you send message which is greater than 16 then the module trims and ignores it which
displaying only the first 16 characters.
Status LED
There are two LEDs on board, one is power LED which is Green in color and comes on as soon
as given power. The other LED is status LED which is Red in color which comes on when it gets
valid serial data packet. Status LED comes on as soon as Line ID is received and goes off as soon
as enter key code is received.
Page 4/7 Doc Version: 1 10-May-16
http://www.sunrom.com/m/1425
1425 Serial UART Interface for 16x2 LCDs
Board Schematic
J1 is mounted on the PCB that connect input VDD(5V) to board VCC that bypass the U2 which is
a 3V regulator IC, which is not used in the application since most 16x2 LCDs are 5V operated.
We can also provide the U1 pre-programmed for your application integration.
VCC
VCC
U1
STM8S003F3
9
C1
100n
R1
10K
NRST
NRST
SPI_MISO/PC7
SPI_MOSI/PC6
SPI_SCK/PC5
SWIM
TIM1_CH4/A2/PC4
TIM1_CH3/PC3
I2C_SCL/PB4
I2C_SDA/PB5
TIM2_CH1/PD4
VCAP
TX/A5/PD5
RX/A6/PD6
TIM2_CH3/PA3
1206
PA2
PA1
VSS
18
VCC
8
CN2
SWIM
3V3
SWIM
GND
NRST
VDD TIM2_CH2/A4/PD3
A3/PD2
4
C2
100n
C3
1uF
1
2
3
4NRST
VCC
7
20 LCD_D7
19 LCD_D6
17
16
15
14
13
12
11
1
2
3
10
6
5
LCD_D5
LCD_D4
LCD_D3
LCD_D2
LCD_D1
LCD_D0
JB
TX
RX
LCD_EN
LCD_RS
STS_LED
R2
10K
D1
1N4148
CN1
SIP4
RX
RXD
TXD
R3
100R VDD
TX
4
3
2
1
+-
J1
VCC
VDD
VCC
VDD
U2
662K
2
OUT
IN
3
GND
C4
1uF 1206
1
C5
1uF 1206
U5
LCD 16x2
Enable
R/W
RS
VL
Gled
Vled
Vdd
Vss
VCC
VCC
R4
1K
6
5
4
3
16
15
2
1
LCD_D7
LCD_D6
LCD_D5
LCD_D4
LCD_D3
LCD_D2
LCD_D1
LCD_D0
14
13
12
11
10
9
8
7
D7
D6
D5
D4
D3
D2
D1
D0
LCD
R5
1K
D2
R-LED
VCC
LCD_EN
LCD_RS
D3
G-LED
STS_LED
VCC
J2
P1
10K PRESET
Sunrom Electronics
JB
http://www.sunrom.com
Title Serial LCD
Code 1425
Date: Tuesday , May 10, 2016
Page 5/7 Doc Version: 1 10-May-16
Sheet 1
Rev
of
1
1
http://www.sunrom.com/m/1425
1425 Serial UART Interface for 16x2 LCDs
Baud Rate Setting Jumper
There is a PCB jumper J2 on board on bottom side of PCB. We provided it open condition which
means 9600 bps baud rate. You can short it with a soldering iron, if you want 115200 bps baud
rate for module.
Product Dimensions
Board Dimensions in mm
Page 6/7 Doc Version: 1 10-May-16
http://www.sunrom.com/m/1425
1425 Serial UART Interface for 16x2 LCDs
Support
Sunrom Electronics offers free technical support (www.sunrom.com/contact) for
customers, until the end of the product’s lifetime, so if something goes wrong, we’re ready and
willing to help!
Technical Support is available by email only and scope is limited to problem faced during use of
the use of product and does not cover end user programming and hardware troubleshooting.
Each product passes through strict quality checks before it reaches you. So if something is not
working out right, the first thing to doubt is the connections or programming of your hardware.
Disclaimer
Sunrom Electronics assumes no responsibility or liability for any errors or inaccuracies that may
appear in the present document. Specification and information contained in the present
schematic are subject to change at any time without notice.
Copyright © 2016 Sunrom Electronics. All rights reserved.
Page 7/7 Doc Version: 1 10-May-16
http://www.sunrom.com/m/1425