Seiko Epson S5U13781R00C100 User manual

Rev. 1.3
S5U13781R00C100
Demonstration Manual
for STM32 VL-Discovery
and XIAMEN ZETTLER ATM0430D5 Panel
Document Number: X94A-G-006-01.3

2 Seiko Epson Corporation S5U13781R00C100 Demonstration Manual
(Rev. 1.3)
Evaluation board/kit and Development tool important notice
1. This evaluation board/kit or development tool is designed for use for engineering evaluation,
demonstration, or development purposes only. Do not use it for other purposes. It is not intended to meet
the requirements of design for finished products.
2. This evaluation board/kit or development tool is intended for use by an electronics engineer and is not a
consumer product. The user should use it properly and in a safe manner. Seiko Epson does not assume any
responsibility or liability of any kind of damage and/or fire caused by the use of it. The user should cease
to use it when any abnormal issue occurs even during proper and safe use.
3. The part used for this evaluation board/kit or development tool may be changed without any notice.
NOTICE
No part of this material may be reproduced or duplicated in any form or by any means without the written
permission of Seiko Epson. Seiko Epson reserves the right to make changes to this material without notice.
Seiko Epson does not assume any liability of any kind arising out of any inaccuracies contained in this material
or due to its application or use in any product or circuit and, further, there is no representation that this material
is applicable to products requiring high level reliability, such as, medical products. Moreover, no license to
any intellectual property rights is granted by implication or otherwise, and there is no representation or
warranty that anything made in accordance with this material will be free from any patent or copyright
infringement of a third party. When exporting the products or technology described in this material, you should
comply with the applicable export control laws and regulations and follow the procedures required by such
laws and regulations. You are requested not to use, to resell, to export and/or to otherwise dispose of the
products (and any technical information furnished, if any) for the development and/or manufacture of weapon
of mass destruction or for other military purposes.
All brands or product names mentioned herein are trademarks and/or registered trademarks of their respective
companies.
©SEIKO EPSON CORPORATION 2007-2018. All rights reserved.

S5U13781R00C100 Demonstration Manual Seiko Epson Corporation 3
(Rev. 1.3)
Table of Contents
1Introduction..........................................................................................................................5
1.1 General Description..................................................................................................................5
1.2 Terminology.............................................................................................................................5
1.3 Required Materials for Demonstration System..........................................................................6
2Preparation of Demo............................................................................................................8
2.1 Instruction for Tool Download and Install ..................................................................................8
2.2 Instruction for Demo Sample Software Download.....................................................................9
2.3Unzip Downloaded Files.........................................................................................................10
3Explanation of the Demo using STM32 VL-Discovery........................................................13
3.1 Summary ...............................................................................................................................13
3.2 Write Image Data into Flash Memory......................................................................................14
3.2.1 S5U13781R00C100 Connection with UM232H...............................................................14
3.2.2 Procedure for Writing Image Data into Flash Memory .....................................................15
3.3 Write Demo Sample Software into STM32 VL-Discovery........................................................18
3.4 Connect the S5U13781R00C100 with the STM32 VL-Discovery.............................................21
3.5 Connect the S5U13781R00C100 with LCD Panel...................................................................22
3.6 Running Demo.......................................................................................................................24
4Explanation of the Demo using PC ....................................................................................26
4.1 Connection with USB Serial Conversion Board: UM232H (Control S1D13781 via SPI) ...........27
4.2 Connection with LCD panel....................................................................................................28
4.3 Displaying an Image on LCD..................................................................................................28
5Change Record..................................................................................................................32
6Sales and Technical Support .............................................................................................33

4 Seiko Epson Corporation S5U13781R00C100 Demonstration Manual
(Rev. 1.3)

Introduction
S5U13781R00C100 Demonstration Manual Seiko Epson Corporation 5
(Rev. 1.3)
1 Introduction
1.1 General Description
This manual describes following two types of demonstration system using S5U13781R00C100 reference
board.
(1) Demonstration system consisting of a microcontroller evaluation board and an LCD panel.
(2) Demonstration system consisting of a personal computer and an LCD panel.
By the instruction of this manual, you can realize above two types of demonstration system easily.
For detailed specification of the S5U13781R00C100 reference board, please refer to the
“S5U13781R00C100 Reference Board User Manual”.
This user manual is updated as appropriate. Please check the Seiko Epson Website at
http://www.epson.jp/device/semicon_e/product/lcd_controllers/reference_design/index.htm
for the latest revision of this document before beginning any development.
We appreciate your comments on our documentation. Please contact us via email at
vdc-documen[email protected].
1.2 Terminology
SPI: Serial Peripheral Interface
LUT: Look Up Table
ppm format: portable pixmap format
bpp: bits per pixel
URL: Uniform Resource Locator
PIP: Picture In Picture
LED: Light Emitting Diode

Introduction
6 Seiko Epson Corporation S5U13781R00C100 Demonstration Manual
(Rev. 1.3)
1.3 Required Materials for Demonstration System
■Hardware
Following parts are required to establish demonstration system.
1. S5U13781R00C100 (LCDC reference board from Epson)
2. ATM0430D5
(4.3 inch, 480x272 dots, 24 bit full color TFT LCD panel from XIAMEN ZETTLER)
3. UM232H (USB-Serial conversion board from FTDI)
4. AC power supply ( e.g. General purpose DC5V2A output, 100V –240V input, inner diameter 2.1mm)
5. AC power supply ( e.g. General purpose DC3.3V2A output, 100V –240V input, inner diameter
2.1mm)
6. DC jack (e.g. General purpose inner diameter 2.1mm)
7. Pin header (e.g. General purpose 2x25 2.54mm pitch)
8. Jumper pin (e.g. General purpose 2.54mm pitch)
9. USB cable A female –mini B male (General purpose A-miniB)
10. Personal computer
For programming of STM32 VL-Discovery and UM232H control.
Required software is available on the internet.
Demonstrations explained in this manual are confirmed operating on a personal computer configured as
follows.
OS: Microsoft Windows XP Professional Version 2002 Service Pack 3
CPU: Intel(R) Core(TM)2 CPU U7600 @1.2GHz
On board memory: 1GB
Capacity of hard disk: 37GB capacity of C: drive. (Disk space required for the software tools is less
than 5GB.)
■Software (Demo)
Sample software package (includes image data for demo and configuration information for LCD) is
available on the Epson web site.

Introduction
S5U13781R00C100 Demonstration Manual Seiko Epson Corporation 7
(Rev. 1.3)
■Software (Development Tool)
Following tools are required.
1. IAR Embedded Workbench for ARM, v. 6.30, 32K Kickstart Edition from IAR systems
2. STM32F10x standard peripheral library from ST Microelectronics
3. Visual C++ 2010 Express from Microsoft
4. Driver and MPSSE-SPI library for UM232H from FTDI
These tools are available without charge on the web site of each vendor.

Preparation of Demo
8 Seiko Epson Corporation S5U13781R00C100 Demonstration Manual
(Rev. 1.3)
2 Preparation of Demo
For preparation of demo, this section describes the tool set up and data package.
2.1 Instruction for Tool Download and Install
1. IAR Embedded Workbench for ARM, v. 6.309, 32K Kickstart Edition from IAR systems
Download from the following URL and install according to the introduction provided from the company.
EWARM 32K size limited version for evaluation (KS version) Ver 6.309. File size: 782MB.
http://ftp.iarsys.co.jp/~download/KH_forSE_EWARMKS6.30_P/EWARM-KS-CD-6309.exe
Note:
Install the IAR Embedded Workbench and Driver (ST-Link) in the ARM Kickstart installer window.
2. ST Microelectronics STM32F10x standard peripheral library
The standard peripheral library is available from the following URL.
<http://www.st.com/internet/com/SOFTWARE_RESOURCES/SW_COMPONENT/FIRMWARE/stm32f
10x_stdperiph_lib.zip>
(3)Microsoft Visual C++ 2010 Express from Microsoft.
Download Microsoft Visual C++ 2010 Express from the following URL and install according to the
introduction provided by Microsoft.
http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express/
4. Driver and MPSSE-SPI library for UM232H from FTDI
Download the Driver and MPSSE-SPI library from the following URLs.
Driver for UM232H
http://www.ftdichip.com/Drivers/D2XX.htm
D2XX driver for Windows can be downloaded from the following URL (located on the above
web page).
http://www.ftdichip.com/Drivers/CDM/CDM20814_WHQL_Certified.zip
MPSSE-SPI library
http://www.ftdichip.com/Support/SoftwareExamples/MPSSE/LibMPSSE-SPI.htm
The MPSSE-SPI library (file name: libMPSSE-SPI.zip) can be downloaded from the following
URL (located on the above web page).
http://www.ftdichip.com/Support/SoftwareExamples/MPSSE/LibMPSSE-SPI/libMPSSE-SPI.zip

Preparation of Demo
S5U13781R00C100 Demonstration Manual Seiko Epson Corporation 9
(Rev. 1.3)
2.2 Instruction for Demo Sample Software Download
The LCDC reference sample software package “epson_lcdc_demo_psp1_rev1.zip” is downloadable from
the EPSON LCDC reference Web site.
Verify that the files described in Table 2-1, ATM0430D5 Download File, are in the downloaded file.
Table 2-1 ATM0430D5 Download File
For ATM0430D5 (4.3 inch, 480x272 dots, 24 bit full color TFT panel from XIAMEN ZETTLER)
Download File
Contents
demo_stm32vl_psp1.zip
Firmware project file for STM32VL-Discovery
Target tool: EWARM
flash_psp1.zip
Project file for data writing to M25P16 (SPI flash ROM)
Target tool: Visual C++ 2010 Express
demo_um232h_psp1.zip
Project file for UM232H demo
Target tool: Visual C++ 2010 Express

Preparation of Demo
10 Seiko Epson Corporation S5U13781R00C100 Demonstration Manual
(Rev. 1.3)
2.3 Unzip Downloaded Files
(1) Preparation for display demo using STM32 VL-Discovery
1. Make the project folder “demo_stm32vl_psp” and place the file “stm32f10x_stdperiph_lib.zip”
into this folder.
2. Unzip the file “stm32f10x_stdperiph_lib.zip”. The folder “STM32F10x_StdPeriph_Lib_Vx.x.x”
will be created.
3. Unzip the file “demo_stm32vl_psp1.zip” described in the Table 2-1, ATM0430D5 Download File.
The folder “S1D13781” and “STM32F10x_s1d13781_Demo” will be created.
4. Move folder “S1D13781” to the following folder.
“\demo_stm32vl_psp\STM32F10x_StdPeriph_Lib_Vx.x.xLibraries”
5. Move folder “STM32F10x_s1d13781_Demo“ to the following folder.
“\demo_stm32vl_psp\STM32F10x_StdPeriph_Lib_Vx.x.x\Project”
*Vx.x.x shows version number.
Figure 2-1 Structure of the Project Folder (STM32)
Projectg folder: demo_stm32vl_psp Contents
└STM32F10x_StdPeriph_Lib_Vx.x.x
├ Project
│ ├
STM32F10x_std13781_Demo
│ … ├
EWARMv5
││ ├
DISCOVER_S1D13781.eww
Project file
││
…
│├
readme.txt
readme file for project
│├
inc
Directory for header files
│└
src
Directory for source files
├Libraries
… ├ CMSIS
├
S1D13781
S1D13781 library
│├
readme.txt
readme file for S1D13781 library
│├
inc
Directory for header files
│└
src
Directory for source files
└STM32F10x_StdPeripf_Driver
STM32F10 library
├Releae_Notes.html
Release noote for STM32F10x
├ inc
Directory for header files
└ src
Directory for source files
Contents provided by Epson are written in Italic letter.

Preparation of Demo
S5U13781R00C100 Demonstration Manual Seiko Epson Corporation 11
(Rev. 1.3)
(2) Preparation for writing data into flash memory
1. Unzip the file “flash_psp1.zip“ described in the Table 2-1, ATM0430D5 Download File. The
project folder “flash_psp” is created.
2. Unzip the MPSSE-SPI library “libMPSSE-SPI.zip” downloaded in Section 2.1, Instruction for
Tool Download and Install. The folder “libMPSSE-SPI” will be created.
3. Double click the “b.bat” icon in the folder “\libMPSSE-SPI\Release-SPI\samples”.
A command window is opened. Type “3” to select “SPI-Static”.
Copy following three files from the folder “\libMPSSE-SPI\Release-SPI\samples\SPI” into the
project folder: “flash_psp”.
ftd2xx.h
libMPSSE.a
libMPSSE_spi.h
This completes embedding the MPSSE-SPI library into the M25P16 write project folder:
“flash_psp”.
Figure 2-2 Structure of The Project Folder (Flash)
Project folder: flash_psp Contents
├
ReadMe.txt
├
EPSON_LCDC_REF.sln
Solution file
├
***.cpp
Source file
├
***.h
Header file
├libMPSSE.a
MPSSE library from FTDI
├libMPSSE.h
MPSSE header file from FTDI
├ftd2xx.h
D2XX header file from FTDI
├
pix
Directory for demo image data
…├
image*_480x272.ppm
Demo image data for PSP panel (in PPM format)
…
├
image*_320x240.ppm
Demo image data for QVGA panel (in PPM format)
…
Contents provided by Epson are written in Italic letter.

Preparation of Demo
12 Seiko Epson Corporation S5U13781R00C100 Demonstration Manual
(Rev. 1.3)
(3) Preparation for display demo using PC
1. Unzip the file “demo_un232h_psp1.zip” described in Table 2-1, ATM0430D5 Download File.
The Project folder “demo_um232h_psp” is created.
2. Unzip the MPSSE-SPI library “libMPSSE-SPI.zip” downloaded in Section 2.1, Instruction for Tool
Download and Install. Then the folder “libMPSSE-SPI” will be created.
3. Double click the “b.bat” icon in the folder “\libMPSSE-SPI\Release-SPI\samples”.
A command window is opened. Then type “3” to select “SPI-Static”.
Copy following three files from the folder “\libMPSSE-SPI\Release-SPI\samples\SPI” into the
project folder: “demo_um232h_psp”.
ftd2xx.h
libMPSSE.a
libMPSSE_spi.h
This completes embedding MPSSE-SPI library into the UM232H demo project folder:
“demo_um232h_psp”.
Figure 2-3 Structure of the project folder (UM232H)
Project folder: demo_um232h_psp Contents
├
ReadMe.txt
├
EPSON_LCDC_REF.sln
Solution file
├
***.cpp
Source file
├
***.h
Header file
├libMPSSE.a
MPSSE library from FTDI
├libMPSSE.h
MPSSE header file from FTDI
├ftd2xx.h
D2XX header file from FTDI
├
pix
Directory for demo image data
…├
image*_480x272.ppm
Demo image data for PSP panel (in PPM format)
…
├
image*_320x240.ppm
Demo image data for QVGA panel (in PPM format)
…
Contents provided by Epson are written in Italic letter.

Explanation of the Demo using STM32 VL-Discovery
S5U13781R00C100 Demonstration Manual Seiko Epson Corporation 13
(Rev. 1.3)
3 Explanation of the Demo using STM32 VL-Discovery
This section describes about the contents and instruction for display demo using STM32 VL-Discovery.
3.1 Summary
The STM32VL-Discovery is the evaluation board for ARM Cortex-M3 on board STM32F100xx
microcontroller from ST Microelectronics (hereafter STM). This board is reasonably priced and includes
an ICE feature, making it suitable for this evaluation.
The demo displays a still image on an LCD panel. Hardware consists of following items.
LCD controller: S5U13781R00C100 reference board
Microcontroller: STM32VL-Discovery
LCD panel:
ATM0430D5 from XIAMEN ZETTLER (4.3 inch, 480x272 dots, 24 bit full color TFT LCD
panel)
Display image data on PC will be written into the 16Mbit SPI NOR Flash standard memory (M25P16) on
the S5U13781R00C100 reference board by using UM232H*.
* The UM232H Single Channel USB Hi-Speed FT232H Development Module is a one chip USB-serial conversion IC from
Future Technology Devices International. This board is reasonably priced, making it suitable for this evaluation.
The firmware for the STM32 VL-Discovery is written using “IAR Embedded Workbench for ARM, 6.30,
32K Kickstart Edition” from IAR systems.

Explanation of the Demo using STM32 VL-Discovery
14 Seiko Epson Corporation S5U13781R00C100 Demonstration Manual
(Rev. 1.3)
3.2 Write Image Data into Flash Memory
3.2.1 S5U13781R00C100 Connection with UM232H
A connection example for the S5U13781R00C100 reference board and the UM232H via SPI for writing
image data into the M25P16 is described in Figure 3-1, Connection with UM232H (via SPI).
If noise on the SPI signal causes problems, place a resistor of several hundred ohms between the
S5U13781R00C100 and STM 32 VL-Discovery SPI port for the purpose of noise damping.
Figure 3-1 Connection with UM232H (via SPI)
LDO
OSC
S1D13781
14x14mm
QFP
1
2
49
50
2
1
50
49
FLASH
55
1
2
49
50
Connect to PC
FT232H
8x8mm
QFN
Mini
USB
J2
J1
J1
J2
J3
J4
J5
J6
J7
J8
J9
J10
1
3
1
14
14
1
51
52
2
1
8
7
J2-7 AD0
J2-8 AD1
J2-9 AD2
J2-10 AD3
J2-3 3V3
J2-2 VIO
J2-6 GND
J1-2 5V0
J1-3 USB
UM232
JP-PIN
Name
FUNCTION
S5U13781
JP-PIN
Name
J1-2
J1-3
5V0
USB
5.0V OUT
VREGIN
J2-2
J2-3
3.3V OUT
VIO
3V3
VCCIO IN
FUNCTION
UM232
JP-PIN
Name
FUNCTION
UM232
JP-PIN
Name
FUNCTION
J2-6
GND
GND
J2-7
AD0
MPSSE/SK
MPSSE/DO
MPSSE/DI
MPSSE/CS
J2-8
AD1
J2-9
AD2
J2-10
AD3
J2-3
J1-2
FLASH-VCC IN
3.3V OUT
3V3
VCC
J4-45
GND
GND
J4-47
SCS#
FLASH CS IN
J4-48
SCK
FLASH SCK IN
J4-49
MOSI
FLASH DATA IN
J4-50
MISO
FLASH DATA
DC
DC
1
55
3.3V external
power supply
S5U13781
JP-PIN
Name
FUNCTION
J4-3
VDDIO
J3-4
3.3V IN
VDDDCDC
3.3V IN
J4-1
GND
GND
J4-2
GND
GND
3.3V external
power supply

Explanation of the Demo using STM32 VL-Discovery
S5U13781R00C100 Demonstration Manual Seiko Epson Corporation 15
(Rev. 1.3)
3.2.2Procedure for Writing Image Data into Flash Memory
This section describes the image data writing procedure to the M25P16 (SPI flash ROM) for the demo
using the ATM0430D5 (4.3 inch, 480x272 dots, 24 bit full color TFT LCD panel from XIAMEN
ZETTLER).
To start, connect the S5U13781R00C100 reference board to the UM232H via SPI, and connect the
UM232H to the PC via USB.
See Section 3.2.1, Connection with UM232H (Control S1D13781 via SPI), for connection information.
Unzip and apply the UM232H driver prepared in Section 2.1, Instruction for tool download and install.
Note: the S5U13781R00C100 requires an external power supply.
↓
Launch the project file for Visual C++ 2010 Express.
Double click the “EPSON_LCDC_REF.sln” icon in the project folder for writing M25P16: “flash_psp”
which is prepared at 2-3-(2): “Preparation for writing data into flash memory”.
↓

Explanation of the Demo using STM32 VL-Discovery
16 Seiko Epson Corporation S5U13781R00C100 Demonstration Manual
(Rev. 1.3)
Proceed with writing data to the M25P16.
Select “Debug” from the menu → “Start Debugging” from the sub menu.
Here, if the window opens which asks “This project is changed. Will you build?”, select “Yes”.
↓
A command window is opened and the data write starts.
*It may take several minutes (up to 10) to write the Epson logo image and the four photo images. Once
writing completes, the command window will be closed automatically.

Explanation of the Demo using STM32 VL-Discovery
S5U13781R00C100 Demonstration Manual Seiko Epson Corporation 17
(Rev. 1.3)
Supplemental information
The Epson logo image and four photograph images data are on the PC and have a color depth of 24bpp.
The stored folder is “flash_psp\pix”.
The software writes each image to the M25P16 in the format used for the demo.
Epson logo (PIP window): Written as 8bpp gray scale and by using the Look Up Table (LUT)
the S1D13781 expands this to a color image
Four photo images (Main window): Written as 16bpp image data

Explanation of the Demo using STM32 VL-Discovery
18 Seiko Epson Corporation S5U13781R00C100 Demonstration Manual
(Rev. 1.3)
3.3 Write Demo Sample Software into STM32 VL-Discovery
Connect the STM32 VL-Discovery to the PC via USB.
↓
Launch the project file for IAR Embedded Workbench.
Double click “DISCOVER_S1D13781.eww” located in the project folder:
“\demo_stm32vl_psp\STM32F10x_StdPeriph_Lib_V3.5.0\Project”.
Here, if the window opens which states “Can not open this file”, then launch “IAR Embedded
Workbench” from the Windows start menu.
↓
EWARM is launched and project file is opened.

Explanation of the Demo using STM32 VL-Discovery
S5U13781R00C100 Demonstration Manual Seiko Epson Corporation 19
(Rev. 1.3)
Build the project file.
Select “Project” from the menu → “Rebuild All” from the sub menu.
↓
Download the code to the STM32 VL-Discovery and write it into Flash.
Select “Project” from the menu → “Download” from the sub menu → “Download active application”
↓

Explanation of the Demo using STM32 VL-Discovery
20 Seiko Epson Corporation S5U13781R00C100 Demonstration Manual
(Rev. 1.3)
The red LED (LD1) blinks and the code will be written.
LD1
Other manuals for S5U13781R00C100
1
Table of contents
Other Seiko Epson Motherboard manuals