S1V30080 Series I2C Interface Sample Program Specifications

Similar documents
S1V3G340 External SPI-Flash Select Guide

S1V3G340 Development Reference Guide

Connecting EPSON Display Controllers to Topway LCD Panels

FSA. Library Link. Rev.1.0

For S1C63 Family Flash microcontroller Multiple-Programming ROM Writer Software (GW63)

S1C17 Family Application Library S1C17 Series Steps Calculation Library

S1C17 Family Port Nested Interrupt Application Notes

S1C17 Family EEPROM Emulation Library Manual

S5U1S65K01H4100 Camera Board Technical Manual

S5U1C88000P Manual (S1C88 Family Peripheral Circuit Board)

S5U1C31D50T1 Manual (S1C31D50 Evaluation Board)

S1C31 Family PA File Creation Tool Manual

S5U1C17000Y2 GangWriter Software Manual

S1C17 Family Application Note S1C17 Series Boot Loader Sample Software

GNU17V3 Setup Guide. Rev.2.0

S1C17 M01/W22/W23/W15 Self-Modifying Software (FLS) Manual

S1R72U16 Development Support Manual

S1C33 Family Application Note S1C33L26 Software Reference Manual

IMU (Inertial Measurement Unit) IMU / USB Interface Board (M-G3xx, M-V3xx) Logger Software User s Guide

CMOS 16-BIT SINGLE CHIP MICROCONTROLLER S5U1C17656T Manual (Software Evaluation Tool for S1C17656)

SG-8506CA-EVB Preliminary

S1F77330 Series Technical Manual

PCB Design Guidelines for S1R72V Series USB 2.0 High-Speed Devices

S5U1C63000P Manual (S1C63 Family Peripheral Circuit Board)

S1R72V17 CPU Connection Guide

Regarding the change of names mentioned in the document, such as Hitachi Electric and Hitachi XX, to Renesas Technology Corp.

This product is under planning; the specifications may be changed in the release model.

CMOS 16-BIT SINGLE CHIP MICROCONTROLLER S5U1C17651T2 Manual (Software Evaluation Tool for S1C17651)

Multi Programmer Ver.4.0 (S5U1C17000Y24) User Manual

Unit: mm Max Max Max Min 5.06 Max Min ± ± 0.10

S1R72U06 Application Note

The S1F77330 series is the bus switch suitable for USB applications. The adopted CMOS process technology characterizes

RC90 Upgrade Procedures

CMOS 16-BIT SINGLE CHIP MICROCOMPUTER. S5U1C17001H User Manual (ICD Mini Ver. 1.0)

S1R77022 PCB Design Guide

S1C17W23 EL Lamp Application Notes

Silicon Epitaxial Planar Zener Diode for Stabilized Power Supply. Type No. Mark Package Code HZS Series Type No. MHD B 7

CMOS 8-BIT SINGLE CHIP MICROCOMPUTER S5U1C88000H5 Manual. (S1C88 Family In-Circuit Emulator)

S1V3034x Series Message Protocol Specification S1V3034x S1V3S344 S1V3G340

SEIKO EPSON CORPORATION

HSM107S. Silicon Schottky Barrier Diode for System Protection. ADE F(Z) Rev 6 Sep Features. Ordering Information.

Dot Matrix LCD Controller Driver

HSM88WK. Proof against high voltage. MPAK package is suitable for high density surface mounting and high speed assembly.

SCI7654M0A/C0A. DC/DC Converter. Double/Triple/Quadruple Boosting 95% Excellent Power Conversion Efficiency Built-in Voltage Regulator DESCRIPTION

Regarding the change of names mentioned in the document, such as Hitachi Electric and Hitachi XX, to Renesas Technology Corp.

S1C17555/565/955/965

S1R72U01 Technical Manual

S5U1C63005P Manual (Peripheral Circuit Board for S1C63256)

HD74HC09. Quad. 2-input AND Gates (with open drain outputs) Features. Pin Arrangement

S7R77024 PCB Design Guide

IIC Driver for the MC9S08GW64

1SS286. Silicon Schottky Barrier Diode for Various Detector, High Speed Switching

HD74AC240/HD74ACT240

Product Description. Application Note. AVR360: XmodemCRC Receive Utility for the AVR. Features. Theory of Operation. Introduction

HD74HC00. Quad. 2-input NAND Gates. Features. Pin Arrangement

HD74HC174. Hex D-type Flip-Flops (with Clear) ADE (Z) 1st. Edition Sep Description. Features. Function Table

HZM6.8WA. Silicon Epitaxial Planar Zener Diode for Surge Absorb. ADE A(Z) Rev 1 Feb. 1, Features. Ordering Information.

1S2075(K) Silicon Epitaxial Planar Diode for High Speed Switching. ADE A (Z) Rev. 1 Aug Features. Ordering Information.

S1V30000 Series Graphical User Interface Application

APPLICATION NOTE. Atmel AT02260: Driving AT42QT1085. Atmel QTouch. Features. Description

S5U13517P00C100 Evaluation Board User Manual

HD74HC of-8-line Data Selector/Multiplexer. Description. Features. Function Table

HD74HC74. Dual D-type Flip-Flops (with Preset and Clear)

S5U13781R01C100 Shield TFT Board for Arduino Due Users Manual

1SS106. Silicon Schottky Barrier Diode for Various Detector, High Speed Switching

2SK213, 2SK214, 2SK215, 2SK216

Regarding the change of names mentioned in the document, such as Hitachi Electric and Hitachi XX, to Renesas Technology Corp.

2SK1056, 2SK1057, 2SK1058

2SK439. Silicon N-Channel MOS FET. Application. Outline. VHF amplifier SPAK. 1. Gate 2. Source 3. Drain

S5U13781R00C10M User Manual

HD74HC273. Octal D-type Flip-Flops (with Clear) ADE (Z) 1st. Edition Sep Description. Features. Function Table

Atmel LF-RFID Kit Comparison Chart. Application Note. Atmel LF-RFID Kit Comparison Chart. 1. Description

S5U1C63002P Manual (Peripheral Circuit Board for S1C63158/63358)

APPLICATION NOTE. Atmel AVR1638: XMEGA RTC Calibration. 8-bit Atmel Microcontrollers. Features. Introduction

* A *, SED1521 * A *

CMOS 16-bit Application Specific Controller

APPLICATION NOTE. Atmel AT03304: SAM D20 I 2 C Slave Bootloader SAM D20. Description. Features

CORAL P. MB86295-EB01 Rev CORAL P Evaluation Board. April Revision 1.3 Page Fujitsu Microelectronics Europe

Section 5 SERCOM. Tasks SPI. In this section you will learn:

DUAL REVERSIBLE MOTOR DRIVER MB3863

S2R72A54 Application Note

S1C31D01 Photoplethysmography (PPG) Demonstration Kit Software Manual

2SJ76, 2SJ77, 2SJ78, 2SJ79

CMOS 16-BIT SINGLE CHIP MICROCONTROLLER S5U1C31D01T1 Manual (Software Evaluation Tool for S1C31D01)

HD74HC bit Parallel-out Shift Register. ADE (Z) 1st. Edition Sep Description. Features. Function Table

YASKAWA AC Drive-J1000 Option. RS-232C Interface. Technical Manual Type SI-232/J, SI-232/JC RS-232C SI-232/J, SI-232/JC J1000

a clock signal and a bi-directional data signal (SCL, SDA)

HZ-P Series Silicon Epitaxial Planar Zener Diodes for Voltage Controller & Voltage Limitter

2SK522. Silicon N-Channel Junction FET. Application. Outline. VHF amplifier, Mixer, local oscillator SPAK. 1. Gate 2. Source 3.

Atmel AVR32847: Migration from/to the UC3L0 64/32/16 from/to the UC3L0 256/ bit Atmel Microcontrollers. Application Note.

SCI Driver for the MC9S08GW64

CARD-E09A Evaluation Kit Software Manual (English) SEIKO EPSON CORPORATION

Design Kit (for ANSOFT Designer TM / Nexxim TM ) User s Manual

One 32-bit counter that can be free running or generate periodic interrupts

etpu General Function Set (Set 1) David Paterson MCD Applications Engineer

AT94K Series Field Programmable System Level Integrated Circuit. Application Note. FPSLIC Baud Rate Generator

Oscillation stop detection circuit included

MTIM Driver for the MC9S08GW64

VCC_3.3V GND. USB Evaluation Cable (M-C30EV041) RTS CTS UART_RXD. Fig1. Block Diagram

AVR4018: Inertial Two (ATAVRSBIN2) Hardware User's Guide. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

Transcription:

S1V30080 Series I2C Interface Sample Program Specifications Rev.1.00

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. This material or portions thereof may contain technology or the subject relating to strategic products under the control of the Foreign Exchange and Foreign Trade Law of Japan and may require an export license from the Ministry of Economy, Trade and Industry or other approval from another government agency. All other product names mentioned herein are trademarks and/or registered trademarks of their respective companies. SEIKO EPSON CORPORATION 2009, All rights reserved.

Table of Contents 1. Overview... 1 2. File List... 2 2.1 Main program files... 2 2.2 S1V30080 control API function definition files... 3 2.3 Message file... 3 2.4 Other source files... 4 3. Sample Program Specifications... 5 3.1 Main programs... 5 3.1.1 main_audio_main.c, main_audio_multi.c... 5 3.1.2 main_synthesizer_melody.c... 7 3.1.3 main_synthesizer_buzztone.c... 9 3.1.4 main_synthesizer_melodystreaming.c... 11 3.1.5 main_mixing_main_multi_melody.c... 13 3.1.6 main_mixing_main_multi_buzztone.c... 14 3.1.7 main_mixing_main_multi_melodystreaming.c... 15 3.1.8 main_easy_start.c... 16 3.2 S1V30080 control API function specifications... 18 3.2.1 I2C_Initialize... 18 3.2.2 I2C_SendMessage... 19 3.2.3 I2C_ReceiveMessage... 20 3.2.4 I2C_SendByte... 21 3.2.5 I2C_ReceiveByte... 22 3.2.6 I2C_SetStartCondition... 23 3.2.7 I2C_SetStopCondition... 24 3.2.8 S080_system_en... 25 3.2.9 S080_sound_playing... 26 3.2.10 S080_message_receive... 27 3.2.11 Other functions... 28 Revision History... 29 S1V30080 Series I2C Interface EPSON i

1. Overview 1. Overview This document describes the sample programs provided to clients using the S1V30080. These sample programs are samples for controlling the S1V30080 on the client host system. Also described are specifications for the API functions used within the sample programs. This document should be used alongside the S1V30080 Series Message Protocol Specifications. * The sample programs were created for the host system used by Seiko Epson for S1V30080 control evaluations. Seiko Epson makes no compatibility guarantees with respect to client systems. S1V30080 Series I2C Interface EPSON 1

2. File List 2. File List All source files for the sample programs are located in the following directory. \i2c_src (source files) 2.1 Main program files The main program files include the set of control programs for audio playback processing, synthesizer playback processing, and audio playback and synthesizer playback mixing processing controlled by the host processor. Table 2.1 lists the main program files. These files are main programs, which include main functions. Select a single main program file for use. Filename main_audio_main.c main_audio_multi.c main_synthesizer_melody.c main_synthesizer_buzztone.c main_synthesizer_melodystreaming.c main_mixing_main_multi_melody.c main_mixing_main_multi_buzztone.c Table 2.1 Main program file list Description Main program file for audio-main playback Main program file for audio-multi playback Main program file for synthesizer melody playback Main program file for synthesizer buzzer tone playback Main program file for synthesizer melody (streaming) playback Main program file for mixing playback (mixing by the following three playback systems: audio-main, audio-multi, and synthesizer melody) Main program file for mixing playback (mixing by the following three playback systems: audio-main, audio-multi, and synthesizer buzzer tone) main_mixing_main_multi_melodystreaming.c Main program file for mixing playback (mixing by the following three playback systems: audio-main, audio-multi, and synthesizer melody streaming playback) main_mixing_easy_start.c Main program for mixing playback (mixing using ISC_EASY_START_REQ) 2 EPSON S1V30080 Series I2C Interface

2. File List 2.2 S1V30080 control API function definition files The S1V30080 control API function definition files define API functions used to control the S1V30080. Table 2.2 lists API function definition files for controlling the S1V30080. For detailed information on API function specifications, refer to 3.2 S1V30080 control API function specifications. Table 2.2 S1V30080 control API source file list i2c_api.c i2c_api.h gpio.c gpio.h Filename Description Source file defining API functions for serial communications control Header file declaring API functions for serial communications control Source file defining API functions for device control not using serial communications Header file declaring API functions for device control not using serial communications * i2c_api.c is a control program for I2C on the host system used by Seiko Epson for S1V30080 control evaluations. Modifications must be made to suit client system specifications before incorporation into the client system. 2.3 Message file The message file defines an array table for REQ messages. Table 2.3 shows the message file. Table 2.3 Message file isc_msgs.c Filename Description Source file defining a data array for REQ messages for sample programs The message file defines the data shown in Table 2.4. It describes the REQ message data sequence, including message start padding and start command 0x00 and 0xAA. Table 2.4 Sample message file unsigned char auciscclkdivconfigreq[] = { 0x00, 0xAA, 0x06, 0x00, 0x14, 0x00, 0x00, 0x00, }; S1V30080 Series I2C Interface EPSON 3

2. File List 2.4 Other source files Table 2.5 lists source files other than those already described above. Table 2.5 List of other source files isc_msgs.h reg_host.h Filename Description Header file defining the lengths and IDs of S1V30080 messages Header file defining the register map of the host system used by Seiko Epson Note: reg_host.h describes the register map on the host system used by Seiko Epson for S1V30080 control evaluations. Modifications must be made to suit client host system specifications before incorporation into the client system. 4 EPSON S1V30080 Series I2C Interface

3. Sample Program Specifications The following describes the specifications for the API functions used by the sample programs and details of the main programs. 3.1 Main programs Nine main programs are provided as I2C-compatible sample programs. Each main program provides control functions in the following sequence. 3.1.1 main_audio_main.c, main_audio_multi.c This is the main program for audio-main playback and audio-multi playback. The program includes simple playback processing, forced stop processing during playback, mute control processing during playback, and volume control processing during playback. 1) Initializes the system (host). 2) Initializes the I2C. 3) Initializes the S1V30080. (Inputs Low High to SYSTEM_EN pin) 4) Inserts a wait time of 1 ms before initiating communications with the S1V30080. 5) Enables/disables checksum verification. (Sends ISC_CHKSUM_CONFIG_REQ) 6) Sets the clock frequency division. (Sends ISC_CLKDIV_CONFIG_REQ) 7) Sets the sample frequency and sound output for volume. (Sends ISC_AUDIO_CONFIG_REQ) < play simple > 8) Sets audio playback. (Sends ISC_SEQUENCER_(MAIN/MULTI)_CONFIG_REQ) 9) Starts audio playback. 10) Waits for playback to end. Confirms the change in SOUND_PLAYING pin output signal from High to Low) < play and stop > 11) Sets audio playback. (Sends ISC_SEQUENCER_(MAIN/MULTI)_CONFIG_REQ) 12) Starts audio playback. 13) Stops playback 1 second after playback starts. (Sends ISC_SOUND_STOP_REQ) 14) Waits for playback to end. S1V30080 Series I2C Interface EPSON 5

< play with mute control > 15) Set audio playback. (Sends ISC_SEQUENCER_(MAIN/MULTI)_CONFIG_REQ) 16) Starts audio playback. 17) Activates mute 1 second after playback starts. (Sends ISC_AUDIO_MUTE_REQ) 18) Cancels mute 1 second after mute activation. (Sends ISC_AUDIO_MUTE_REQ) 19) Waits for playback to end. < play with volume control > 20) Sets audio playback. (Sends ISC_SEQUENCER_(MAIN/MULTI)_CONFIG_REQ) 21) Starts audio playback. 22) Gradually reduces volume immediately after playback starts, then gradually increases volume. (Repeatedly sends ISC_AUDIO_VOLUME_REQ) 23) Waits for playback to end. 6 EPSON S1V30080 Series I2C Interface

3.1.2 main_synthesizer_melody.c S1V30080 Series I2C Interface EPSON 7 This is the main program for synthesizer melody playback. The program includes simple playback processing, forced stop processing during playback, mute control processing during playback, and volume control processing during playback. 1) Initializes the system (host). 2) Initializes the I2C. 3) Initializes the S1V30080. (Inputs Low High to SYSTEM_EN pin) 4) Inserts a wait time of 1 ms before initiating communications with the S1V30080. 5) Enables/disables checksum verification. (Sends ISC_CHKSUM_CONFIG_REQ) 6) Sets the clock frequency division. (Sends ISC_CLKDIV_CONFIG_REQ) 7) Sets the sample frequency and sound output for volume. (Sends ISC_AUDIO_CONFIG_REQ) 8) Sets the tempo and envelope for synthesizer melody playback. (Sends ISC_SYNTHESIZER_MELODY_CONFIG_REQ) < play simple > 9) Sets musical note data for synthesizer melody playback. (Sends ISC_SYNTHESIZER_MELODY_SET_REQ) 10) Starts synthesizer melody playback. 11) Waits for playback to end. < play and stop > 12) Sets musical note data for synthesizer melody playback. (Sends ISC_SYNTHESIZER_MELODY_SET_REQ) 13) Starts synthesizer melody playback. 14) Stops playback 1 second after playback starts. (Sends ISC_SOUND_STOP_REQ) 15) Waits for playback to end. < play with mute control > 16) Sets musical note data for synthesizer melody playback. (Sends ISC_SYNTHESIZER_MELODY_SET_REQ) 17) Starts synthesizer melody playback. 18) Activates mute 1 second after playback starts. (Sends ISC_AUDIO_MUTE_REQ) 19) Cancels mute 1 second after mute activation. (Sends ISC_AUDIO_MUTE_REQ) 20) Waits for playback to end.

< play with volume control > 21) Sets musical note data for synthesizer melody playback. (Sends ISC_SYNTHESIZER_MELODY_SET_REQ) 22) Starts synthesizer melody playback. 23) Gradually reduces volume immediately after playback starts, then gradually increases volume. (Repeatedly sends ISC_AUDIO_VOLUME_REQ) 24) Waits for playback to end. 8 EPSON S1V30080 Series I2C Interface

3.1.3 main_synthesizer_buzztone.c This is the main program for synthesizer buzzer tone playback. The program includes simple playback processing, forced stop processing during playback, mute control processing during playback, and volume control processing during playback. 1) Initializes the system (host). 2) Initializes the I2C. 3) Initializes the S1V30080. (Inputs Low High to SYSTEM_EN pin) 4) Inserts a wait time of 1 ms before initiating communications with the S1V30080. 5) Enables/disables checksum verification. (Sends ISC_CHKSUM_CONFIG_REQ) 6) Sets the clock frequency division. (Sends ISC_CLKDIV_CONFIG_REQ) 7) Sets the sample frequency and sound output for volume. (Sends ISC_AUDIO_CONFIG_REQ) < play simple > 8) Sets synthesizer buzzer tone playback. (Sends ISC_SYNTHESIZER_BUZZ_TONE_SET_REQ) 9) Starts synthesizer buzzer tone playback. 10) Waits for playback to end. < play and stop > 11) Sets synthesizer buzzer tone playback. (Sends ISC_SYNTHESIZER_BUZZ_TONE_SET_REQ) 12) Starts synthesizer buzzer tone playback. 13) Stops playback 1 second after playback starts. (Sends ISC_SOUND_STOP_REQ) 14) Waits for playback to end. < play with mute control > 15) Sets synthesizer buzzer tone playback. (Sends ISC_SYNTHESIZER_BUZZ_TONE_SET_REQ) 16) Starts synthesizer buzzer tone playback. 17) Activates mute 1 second after playback starts. (Sends ISC_AUDIO_MUTE_REQ) 18) Cancels mute 1 second after mute activation. (Sends ISC_AUDIO_MUTE_REQ) 19) Waits for playback to end. S1V30080 Series I2C Interface EPSON 9

< play with volume control > 20) Sets synthesizer buzzer tone playback. (Sends ISC_SYNTHESIZER_BUZZ_TONE_SET_REQ) 21) Starts synthesizer buzzer tone playback. 22) Gradually reduces volume immediately after playback starts, then gradually increases volume. (Repeatedly sends ISC_AUDIO_VOLUME_REQ) 23) Waits for playback to end. 10 EPSON S1V30080 Series I2C Interface

3.1.4 main_synthesizer_melodystreaming.c This is the main program for synthesizer melody (streaming) playback. The program includes simple playback processing, forced stop processing during playback, mute control processing during playback, and volume control processing during playback. 1) Initializes the system (host). 2) Initializes the I2C. 3) Initializes the S1V30080. (Inputs Low High to SYSTEM_EN pin) 4) Inserts a wait time of 1 ms before initiating communications with the S1V30080. 5) Enables/disables checksum verification. (Sends ISC_CHKSUM_CONFIG_REQ) 6) Sets the clock frequency division. (Sends ISC_CLKDIV_CONFIG_REQ) 7) Sets the sample frequency and sound output for volume. (Sends ISC_AUDIO_CONFIG_REQ) 8) Sets the tempo and envelope for synthesizer melody playback. (Sends ISC_SYNTHESIZER_MELODY_CONFIG_REQ) < play simple > 9) Sends musical note data for synthesizer melody playback. (Sends ISC_SYNTHESIZER_MELODY_START_REQ) 10) Waits until the S1V30080 is ready to receive the next message. (Confirms the change in MSG_RECEIVE pin output signal from Low to High then back to Low) 11) Sends musical note data for the next synthesizer melody playback. (Sends ISC_SYNTHESIZER_MELODY_START_REQ) 12) Repeats 10) and 11) until reaching the end of the musical note data for synthesizer melody playback. 13) Waits for playback to end. < play and stop > 14) Sends musical note data for synthesizer melody playback. (Sends ISC_SYNTHESIZER_MELODY_START_REQ) 15) Waits until the S1V30080 is ready to receive the next message. (Confirms the change in MSG_RECEIVE pin output signal from Low to High then back to Low) 16) Sends musical note data for the next synthesizer melody playback. (Sends ISC_SYNTHESIZER_MELODY_START_REQ) 17) Repeats 15) and 16) until reaching the end of the musical note data for synthesizer melody playback. 18) Stops playback 1 second after playback starts. (Sends ISC_SOUND_STOP_REQ) 19) Waits for playback to end. S1V30080 Series I2C Interface EPSON 11

< play with mute control > 20) Sends musical note data for synthesizer melody playback. (Sends ISC_SYNTHESIZER_MELODY_START_REQ) 21) Waits until the S1V30080 is ready to receive the next message. (Confirms the change in MSG_RECEIVE pin output signal from Low to High then back to Low) 22) Sends musical note data for the next synthesizer melody playback. (Sends ISC_SYNTHESIZER_MELODY_START_REQ) 23) Repeats 21) and 22) until reaching the end of the musical note data for synthesizer melody playback. 24) Activates mute 1 second after playback starts. (Sends ISC_AUDIO_MUTE_REQ) 25) Cancels mute 1 second after mute activation. (Sends ISC_AUDIO_MUTE_REQ) 26) Waits for playback to end. < play with volume control > 27) Sends musical note data for synthesizer melody playback. (Sends ISC_SYNTHESIZER_MELODY_START_REQ) 28) Waits until the S1V30080 is ready to receive the next message. (Confirms the change in MSG_RECEIVE pin output signal from Low to High then back to Low) 29) Sends musical note data for the next synthesizer melody playback. (Sends ISC_SYNTHESIZER_MELODY_START_REQ) 30) Repeats 28) and 29) until reaching the end of the musical note data for synthesizer melody playback. 31) Gradually reduces volume immediately after playback starts, then gradually increases volume. (Repeatedly sends ISC_AUDIO_VOLUME_REQ) 32) Waits for playback to end. 12 EPSON S1V30080 Series I2C Interface

3.1.5 main_mixing_main_multi_melody.c This is the main program for mixing playback. This program performs mixing playback using the three playback systems: audio-main, audio-multi, and synthesizer melody. 1) Initializes the system (host). 2) Initializes the I2C. 3) Initializes the S1V30080. (Inputs Low High to SYSTEM_EN pin) 4) Inserts a wait time of 1 ms before initiating communications with the S1V30080. 5) Enables/disables checksum verification. (Sends ISC_CHKSUM_CONFIG_REQ) 6) Sets the clock frequency division. (Sends ISC_CLKDIV_CONFIG_REQ) 7) Sets the sample frequency and sound output for volume. (Sends ISC_AUDIO_CONFIG_REQ) 8) Sets audio-main playback. (Sends ISC_SEQUENCER_MAIN_CONFIG_REQ) 9) Sets audio-multi playback. (Sends ISC_SEQUENCER_MULTI_CONFIG_REQ) 10) Sets the tempo and envelope for synthesizer melody playback. (Sends ISC_SYNTHESIZER_MELODY_CONFIG_REQ) 11) Sets musical note data for synthesizer melody playback. (Sends ISC_SYNTHESIZER_MELODY_SET_REQ) < play synchronous-mixing > 12) Enables playback start flags for all playback systems and starts mixing playback. 13) Waits for playback to end. < play asynchronous-mixing > 14) Enables only the audio-main playback start flag and starts playback. 15) Enables only the audio-multi playback start flag 1 second after the start of audio-main playback, then starts playback. 16) Enables only the synthesizer melody playback start flag 1 second after the start of audio-multi playback, then starts playback. 17) Waits for playback to end. * Mixing playback is also possible even if the playback sequence of the three playback systems indicated in 14), 15), and 16) is modified. S1V30080 Series I2C Interface EPSON 13

3.1.6 main_mixing_main_multi_buzztone.c This is the main program for mixing playback. This program performs mixing playback using the three playback systems: audio-main, audio-multi, and synthesizer buzzer tone. 1) Initializes the system (host). 2) Initializes the I2C. 3) Initializes the S1V30080. (Inputs Low High to SYSTEM_EN pin) 4) Inserts a wait time of 1 ms before initiating communications with the S1V30080. 5) Enables/disables checksum verification. (Sends ISC_CHKSUM_CONFIG_REQ) 6) Sets the clock frequency division. (Sends ISC_CLKDIV_CONFIG_REQ) 7) Sets the sample frequency and sound output for volume. (Sends ISC_AUDIO_CONFIG_REQ) 8) Sets audio-main playback. (Sends ISC_SEQUENCER_MAIN_CONFIG_REQ) 9) Sets audio-multi playback. (Sends ISC_SEQUENCER_MULTI_CONFIG_REQ) 10) Sets synthesizer buzzer tone playback. (Sends ISC_SYNTHESIZER_BUZZ_TONE_SET_REQ) < play synchronous-mixing > 11) Enables playback start flags for all playback systems and starts mixing playback. 12) Waits for playback to end. < play asynchronous-mixing > 13) Enables only the audio-main playback start flag and starts playback. 14) Enables only the audio-multi playback start flag 1 second after the start of audio-main playback, then starts playback. 15) Enables only the synthesizer buzzer tone playback start flag 1 second after the start of audio-multi playback, then starts playback. 16) Waits for playback to end. * Mixing playback is also possible even if the playback sequence of the three playback systems indicated in 13), 14), and 15) is modified. 14 EPSON S1V30080 Series I2C Interface

3.1.7 main_mixing_main_multi_melodystreaming.c This is the main program for mixing playback. This program performs mixing playback using the three playback systems: audio-main, audio-multi, and synthesizer melody (streaming). 1) Initializes the system (host). 2) Initializes the I2C. 3) Initializes the S1V30080. (Inputs Low High to SYSTEM_EN pin) 4) Inserts a wait time of 1 ms before initiating communications with the S1V30080. 5) Enables/disables checksum verification. (Sends ISC_CHKSUM_CONFIG_REQ) 6) Sets the clock frequency division. (Sends ISC_CLKDIV_CONFIG_REQ) 7) Sets the sample frequency and sound output for volume. (Sends ISC_AUDIO_CONFIG_REQ) 8) Sets audio-main playback. (Sends ISC_SEQUENCER_MAIN_CONFIG_REQ) 9) Sets audio-multi playback. (Sends ISC_SEQUENCER_MULTI_CONFIG_REQ) 10) Sets the tempo and envelope for synthesizer melody playback. (Sends ISC_SYNTHESIZER_MELODY_CONFIG_REQ) < play mixing > 11) Sends the first musical tone data and starts synthesizer melody playback. (Sends ISC_SYNTHESIZER_MELODY_START_REQ) 12) Waits until the S1V30080 is ready to receive the next message. (Confirms the change in MSG_RECEIVE pin output signal from Low to High then back to Low) 13) Sends musical note data for the next synthesizer melody playback. (Sends ISC_SYNTHESIZER_MELODY_START_REQ) 14) Repeats 12) and 13) until reaching the end of the musical note data for synthesizer melody playback. 15) Enables only the audio-main playback start flag 1 second after the start of synthesizer melody playback, then starts playback. 16) Enables only the audio-multi playback start flag 1 second after the start of audio-main playback, then starts playback. 17) Waits for playback to end. * Although audio playback in the above process flow starts in the middle of synthesizer melody streaming playback, it is also possible to start synthesizer melody streaming playback during audio playback. S1V30080 Series I2C Interface EPSON 15

3.1.8 main_easy_start.c This is the main program for mixing playback. This program performs mixing playback using the ISC_EASY_START_REQ message. * To run this program, the voice IC s built-in ROM or external flash memory must contain a memory storage command. 1) Initializes the system (host). 2) Initializes the I2C. 3) Initializes the S1V30080. (Inputs Low High to SYSTEM_EN pin) 4) Inserts a wait time of 1 ms before initiating communications with the S1V30080. < play simple > 5) Specifies Index No. 0 for the memory storage command, then starts playback. (Sends ISC_EASY_START_REQ) 6) Waits for playback to end. < play and stop > 7) Specifies Index No. 0 for the memory storage command, then starts playback. (Sends ISC_EASY_START_REQ) 8) Stops playback 1 second after playback starts. (Sends ISC_SOUND_STOP_REQ) 9) Waits for playback to end. < play with mute control > 10) Specifies Index No. 0 for the memory storage command, then starts playback. (Sends ISC_EASY_START_REQ) 11) Activates mute 1 second after playback starts. (Sends ISC_AUDIO_MUTE_REQ) 12) Cancels mute 1 second after mute activation. (Sends ISC_AUDIO_MUTE_REQ) 13) Waits for playback to end. < play with volume control > 14) Specifies Index No. 0 for the memory storage command, then starts playback. (Sends ISC_EASY_START_REQ) 15) Gradually reduces volume immediately after playback starts, then gradually increases volume. (Repeatedly sends ISC_AUDIO_VOLUME_REQ) 16) Waits for playback to end. 16 EPSON S1V30080 Series I2C Interface

< play mixing > 17) Specifies Index No. 0 for the memory storage command, then starts playback. (Sends ISC_EASY_START_REQ) 18) Specifies Index No. 1 for the memory storage command and starts playback 1 second after playback starts described in 17). (Sends ISC_EASY_START_REQ) 19) Specifies Index No. 2 for the memory storage command and starts playback 1 second after playback starts described in 18). (Sends ISC_EASY_START_REQ) 20) Waits for playback to end. * When using this main program for mixing playback, the memory storage commands specified by Command Indexes 0, 1, and 2 must be for different playback systems (audio-main playback, audio-multi playback, synthesizer playback). Note that mixing playback cannot be performed by using memory storage commands for the same playback system due to specification restrictions. For detailed information on mixing playback, refer to the S1V30080 Series Message Protocol Specifications. S1V30080 Series I2C Interface EPSON 17

3.2 S1V30080 control API function specifications The following describes specifications for API functions for controlling the S1V30080. * The API functions described below are control programs for I2C on the host system used by Seiko Epson for S1V30080 control evaluations. Modifications must be made to API functions to suit client system specifications before incorporation into the client system. 3.2.1 I2C_Initialize [Syntax] [Function] void I2C_Initialize ( void ) Sets initial I2C settings. [Input arguments] [Output arguments] [Return values] [Function description] Initializes I2C registers. This function complies with the I2C specifications of the host processor used for the Seiko Epson evaluation system and performs the following actions. (1) Disables the I2C. (2) Disables I2C interrupt settings. (3) Sets the I2C port input/output direction. (4) Sets the I2C baud rate. (5) Sets the transfer mode to MSB first. (6) Enables the I2C. 18 EPSON S1V30080 Series I2C Interface

3.2.2 I2C_SendMessage [Syntax] [Function] int I2C_SendMessage ( unsigned char *pucsendmessage, int ichecksumflag ) Sends messages to the S1V30080. [Input arguments] pucsendmessage ichecksumflag [Output arguments] [Return values] Specifies the address of the memory area containing the message to be sent. Enables/disables checksum verification. (0: Disable / 1: Enable) Returns 0 for normal termination; otherwise returns the following error codes. Error code Value Description I2CERR_SUCCESS 0 Returned for normal termination. I2CERR_NULL_PTR -1 Returned if the argument is a null pointer. [Function description] Sends the REQ message to the S1V30080. This function sends data by referring to the length field value in the REQ message to be sent. After the message is sent, the function internally confirms the change in S1V30080 s MESSAGE_RECEIVE pin signal output from Low to High. However, in the case of the following messages, this function ends without confirming the signal change due to message protocol specifications for melody streaming playback. ISC_SYNTHESIZER_MELODY_START_REQ ISC_AUDIO_MUTE_REQ ISC_AUDIO_VOLUME_REQ S1V30080 Series I2C Interface EPSON 19

3.2.3 I2C_ReceiveMessage [Syntax] [Function] int I2C_ReceiveMessage ( unsigned char Receives messages from the S1V30080. [Input arguments] [Output arguments] aucreceivedmessage [Return values] aucreceivedmessage[]) Specifies the array for storing the received message. Returns 0 for normal termination; otherwise returns the following error codes. Error code Value Description I2CERR_SUCCESS 0 Returned for normal termination. I2CERR_NULL_PTR -1 Returned if the argument is a null pointer. I2CERR_TIMEOUT 1 Returned when the message from the S1V30080 is not received within the preset timeout period. [Function description] Receives RESP messages sent from the S1V30080. Data from the S1V30080 continues to be received until the message start command (0xAA) is detected. After the message start command is detected, the function refers to the length field value contained in the received data and continues receiving data. The aucreceivedmessage output argument contains the data array of the received message. 20 EPSON S1V30080 Series I2C Interface

3.2.4 I2C_SendByte [Syntax] [Function] void I2C_SendByte ( unsigned char ucsenddata ) Sends 1 byte of data. [Input arguments] ucsenddata [Output arguments] [Return values] [Function description] Specifies 1 byte of the data to be sent. Sends 1 byte of data to the S1V30080 via I2C. S1V30080 Series I2C Interface EPSON 21

3.2.5 I2C_ReceiveByte [Syntax] [Function] unsigned char I2C_ReceiveByte ( char cack ) Receives 1 byte of data. [Input arguments] cack [Output arguments] [Return values] Returns 1 byte of received data. [Function description] Specifies Ack information returned to the S1V30080 functioning as the slave device. (0: Ack / 1: Nack) Receives 1 byte of data from the S1V30080 via I2C. 22 EPSON S1V30080 Series I2C Interface

3.2.6 I2C_SetStartCondition [Syntax] [Function] char _I2cSetStartCondition ( char unsigned short Sets the start conditions. [Input arguments] caddressmode, usaddress) caddressmode Specifies the slave address mode. Specify 7. usaddress Specifies the slave address. Specify 01101100 b(0x6c). [Output arguments] [Return values] Returns the Ack information received from the S1V30080. (0: Ack / 1: Nack) [Function description] Outputs the start condition waveform and sends the slave address. The Ack information is then received from the S1V30080 functioning as the slave device and returned as a return value. S1V30080 Series I2C Interface EPSON 23

3.2.7 I2C_SetStopCondition [Syntax] void I2C_SetStartCondition ( void ) [Function] Sets stop conditions. [Input arguments] [Output arguments] [Return values] [Function description] Outputs the stop condition waveform. 24 EPSON S1V30080 Series I2C Interface

3.2.8 S080_system_en [Syntax] [Function] void S080_system_en (int ivalue ) Controls the input signal to the SYSTEM_EN pin of the S1V30080. [Input arguments] ivalue [Output arguments] [Return values] [Function description] Specifies the signal to be input to the SYSTEM_EN pin. (0: Low / 1: High) Controls the input signal to the SYSTEM_EN pin to control the reset of the S1V30080. Reset is achieved by the input of Low High Low to the SYSTEM_EN pin of the S1V30080. To use this function, you must connect the GPIO pin of the host processor to the S1V30080 SYSTEM_EN pin for signal control. S1V30080 Series I2C Interface EPSON 25

3.2.9 S080_sound_playing [Syntax] [Function] void S080_sound_playing (void ) Acquires the status of the output signal from the S1V30080 SOUND_PLAYING pin. [Input arguments] [Output arguments] [Return values] Returns the voice output state. (0: Low / 1: High) [Function description] Acquires the signal output state from the SOUND_PLAYING pin to detect the condition of the voice output from the S1V30080. Returns High when voice is output or Low when voice is not output. To use this function, you must connect the GPIO pin of the host processor to the S1V30080 SOUND_PLAYING pin for signal control. 26 EPSON S1V30080 Series I2C Interface

3.2.10 S080_message_receive [Syntax] void [Function] S080_message_receive Detects the change in the MESSAGE_RECEIVE pin output signal from Low to High. [Input arguments] [Output arguments] [Return values] Returns the state of the change in output signal from Low to High. (0: Without change / 1: With change) [Function description] Detects whether the output signal from the MESSAGE_RECEIVE pin of the S1V30080 changes from Low to High. Returns 1 when a change is detected or 0 when no change is detected. This function detects a change in the signal using interrupt processing. To use this function, you must connect the GPIO pin of the host processor to the S1V30080 SOUND_PLAYING pin to apply and control the interrupt to the GPIO pin. S1V30080 Series I2C Interface EPSON 27

3.2.11 Other functions In addition to the functions described thus far, the sample programs use the following functions. _i2csenddataasync Sends data to the slave. _i2creceiveack Receives Ack/Nack from the slave. _i2csendack Sends Ack/Nack to the slave. _i2ccreatestart Generates the start condition signal. _i2ccreatestop Generates the stop condition signal. * The above functions are software control functions prepared to implement the I2C I/F using the bidirectional serial I/F (DCSIO) of the two channels mounted on the host system used by Seiko Epson for S1V30080 control evaluations. Modifications must be made to suit client system I2C I/F specifications before incorporation into the client host system. 28 EPSON S1V30080 Series I2C Interface

Revision History Revision History Revision details Date Rev. Page Type Details 02/16/2009 1.00 All New Newly established S1V30080 Series I2C Interface EPSON 29

International Sales Operations AMERICA EPSON ELECTRONICS AMERICA, INC. 2580 Orchard Parkway, San Jose, CA 95131, USA Phone: +1-800-228-3964 FAX: +1-408-922-0238 EUROPE EPSON EUROPE ELECTRONICS GmbH Riesstrasse 15, 80992 Munich, GERMANY Phone: +49-89-14005-0 FAX: +49-89-14005-110 ASIA EPSON (CHINA) CO., LTD. 7F, Jinbao Bldg., No.89 Jinbao St., Dongcheng District, Beijing 100005, CHINA Phone: +86-10-6410-6655 FAX: +86-10-6410-7320 SHANGHAI BRANCH 7F, Block B, Hi-Tech Bldg., 900 Yishan Road, Shanghai 200233, CHINA Phone: +86-21-5423-5522 FAX: +86-21-5423-5512 SHENZHEN BRANCH 12F, Dawning Mansion, Keji South 12th Road, Hi-Tech Park, Shenzhen 518057, CHINA Phone: +86-755-2699-3828 FAX: +86-755-2699-3838 EPSON HONG KONG LTD. 20/F, Harbour Centre, 25 Harbour Road, Wanchai, Hong Kong Phone: +852-2585-4600 FAX: +852-2827-4346 Telex: 65542 EPSCO HX EPSON TAIWAN TECHNOLOGY & TRADING LTD. 14F, No. 7, Song Ren Road, Taipei 110, TAIWAN Phone: +886-2-8786-6688 FAX: +886-2-8786-6660 EPSON SINGAPORE PTE., LTD. 1 HarbourFront Place, #03-02 HarbourFront Tower One, Singapore 098633 Phone: +65-6586-5500 FAX: +65-6271-3182 SEIKO EPSON CORP. KOREA OFFICE 50F, KLI 63 Bldg., 60 Yoido-dong, Youngdeungpo-Ku, Seoul 150-763, KOREA Phone: +82-2-784-6027 FAX: +82-2-767-3677 SEIKO EPSON CORP. SEMICONDUCTOR OPERATIONS DIVISION IC Sales Dept. IC International Sales Group 421-8, Hino, Hino-shi, Tokyo 191-8501, JAPAN Phone: +81-42-587-5814 FAX: +81-42-587-5117 Document Code: 411657600 First Issue February 2009 D