AN2786
Application note
STEVAL-IHI001V1 demonstration board: washing machine
user interface based on the ST7LITE49M and STLED316S
Introduction
The STEVAL-IHI001V1 is a demonstration board designed to simulate the user interface of
a modern washing machine.
The board is based on the low-cost 8-bit ST7LITE49M microcontroller equipped with an I²C
bus interface, and the STLED316S serial interfaced 6-digit LED controller with key-scan.
The demonstration board is designed to work as a stand-alone application, or as a
motherboard for the STEVAL-IHI002V1 daughter board, which features the STMPE1208S
capacitive sensing device and can be plugged into the STEVAL-IHI001V1 to operate as a
capacitive single touch keyboard.
June 2008
Rev 1
1/10
www.st.com
Contents
AN2786
Contents
1
2
3
4
5
6
STLED316S: serial interfaced LED controller with key-scan . . . . . . . . 3
Demonstration board application schematic . . . . . . . . . . . . . . . . . . . . . 4
Bill of material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
STEVAL-IHI001V1 demonstration board photos . . . . . . . . . . . . . . . . . . 7
References and related materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2/10
AN2786
STLED316S: serial interfaced LED controller with key-scan
1
STLED316S: serial interfaced LED controller with
key-scan
The device used for the washing machine user interface is a compact LED controller and
driver. It interfaces with the MCU through a simple 3-wire serial interface.
The STLED316S drives up to 56 LEDs connected in a common anode configuration.
Individual digits may be addressed and updated directly, without re-writing the entire display
panel.
The maximum segment current is set through a single external resistor (R
SET
).
Additionally, the STLED316S includes key scanning for an 8x2 key matrix, which
automatically scans a matrix of up to 16 keys.
Figure 1.
Product application diagram example
The STLED316S is equipped with an internal display RAM memory to store the data
transmitted from the MCU through the serial interface.
The device is programmed through a variety of read/write commands that permit the user to
set the display panel and manage the keyboard.
To avoid scanning the keyboard repeatedly searching for a pressed key, an additional IRQ
signal can be connected to the MCU. An interrupt is generated whenever a key is pressed.
3/10
Demonstration board application schematic
AN2786
2
Demonstration board application schematic
The demonstration board power supply is designed using a L5970D step-down switching
regulator. The input supply voltage may vary in the range of 5 V to 30 VDC, allowing the
user to connect a standard AC notebook computer power supply. The input is reverse-
polarity protected (D6), and over-voltage protected (TR1).
The power supply output voltage is set at 5 VDC by mean of 2 resistors (R2, R3).
The ST7LITE49M MCU (U2) runs at 8 MHz by means of an internal oscillator, avoiding the
need for any external components. Pull-up resistors R10 and R11 are used for the I²C bus,
while R12 and R13 prevent the MCU from entering the programming mode unintentionally.
Finally, R14 and R15 set the working mode (MD1, MD2 at logic 1 is "standalone mode").
The LEDs, display and keyboard are entirely managed through U3, (STLED316S). 8
segment lines are multiplexed with 7 digit lines, allowing a total of 56 LEDs (in a common
anode configuration) to be controlled by a single STLED316S device. R4 sets the LED peak
current.
Communication between the MCU and the STLED316S is achieved by means of 3 pins:
data input/output (DIO), clock (CLK) and strobe (STB). An extra IRQ pin generates an
interrupt request any time a key on the keyboard is pressed.
The demonstration board is equipped with connectors J3 and J4 to allow connection to the
STEVAL-IHI002V1 daughter demonstration board. The board is also equipped with ICC
programming connector J2 to program the MCU in-circuit. An extra I²C bus connector (J5) is
foreseen to eventually connect other boards or devices via I²C bus.
4/10
AN2786
SEG8
SEG7
SEG6
SEG5
SEG4
Figure 2.
SEG3
SEG2
SEG1
DIG3
DY1
Common Anode
DIG3
9
d
c
b
a
A1
A2
8
e
d
10
9
dp
6
f
c
2
7
g
1
g
b
1
5
f
2
dp
a
6
4
e
A2
A1
7
5
DL10
DL12
DL14
DL16
DL18
DL20
DL22
DL24
4
3
10
8
3
9
7
5
4
3
DY 2
Common Anode
DY 3
Common Anode
10
d
c
b
a
A1
e
f
g
dp
A2
2
1
6
8
DL11
DL13
DL15
DL17
DL19
DL21
DL1
DL3
DL5
DL7
DL2
DL4
DL6
DIG5
DL8
DIG6
DL9
DIG7
DL23
U3
STLED316S
DIO
CLK
STB
IRQ
1
2
3
4
DIN/DOUT
CLK
STB
IRQ_N
KEY 1
KEY 2
+VDD
21
20
19
18
U2
ST7FLI49MK1T6
17
R10
4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IRQ
BUZ
D4 1N4148
SEG4
+VDD
2
D5 1N4148
P7
TACT-2
4
3
4
P6
TACT-2
SEG5
1
2
1
J3
CON15
TP3
TP4
+VDD
+VDD
MD2
+VDD
I2C Expander
R2
15K
1%
FB
5
+VDD
C4
100uF
16V
+
Q1
BC337
R8
10K
5%
ICC Programmer
BZ1
Buzzer
1
2
R9
4K7
5%
ICCD
ICCC
RST
BUZ
2
4
6
8
10
TP1
TP2
+VDD
J4
CON10
Demonstration board application schematic
2
1
2
1
2
1
R6
10K
5%
3
P10
TACT-2
P9
TACT-2
P8
TACT-2
3
4
3
4
3
4
KEY 2
U4
L5970D
6
VREF
VCC
COMP
INH
SY NC
3
7
GND
OUT
1
2
8
4
2
1
L1
33uH
+VDD
I2CD
2
I2CC
4
RST
6
RST0
8
MD1
10
J5
CON10A
1
3
5
7
9
J1
CON3
D6
1N4007
MD1
MD2
GINT
TINT
PA2
PA3
PA4
RST0
I2CD
I2CC
1
2
3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
1
2
3
4
5
6
7
8
9
10
INPUT
5V-30V
R3
4K7
1%
TR1
SMAJ33A-TR
D7
STPS340U
C2
220pF
C3
22nF
C1
10uF
35V
R1
4K7
J2
CON10A
1
3
5
7
9
Demonstration board application schematic
5/10