S1C17 Family Application Library S1C17 Series Steps Calculation Library

Similar documents
S1C17 Family Port Nested Interrupt Application Notes

S1V3G340 External SPI-Flash Select Guide

S1C17 Family EEPROM Emulation Library Manual

S1C31 Family PA File Creation Tool Manual

GNU17V3 Setup Guide. Rev.2.0

S5U1C31D50T1 Manual (S1C31D50 Evaluation Board)

S1C17 Family Application Note S1C17 Series Boot Loader Sample Software

FSA. Library Link. Rev.1.0

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

S1V30080 Series I2C Interface Sample Program Specifications

Connecting EPSON Display Controllers to Topway LCD Panels

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

S1C33 Family Application Note S1C33L26 Software Reference Manual

SG-8506CA-EVB Preliminary

S5U1C88000P Manual (S1C88 Family Peripheral Circuit Board)

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)

Multi Programmer Ver.4.0 (S5U1C17000Y24) User Manual

S1C31D01 Photoplethysmography (PPG) Demonstration Kit Software Manual

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

S1V3G340 Development Reference Guide

S5U1C17000Y2 GangWriter Software Manual

S5U1S65K01H4100 Camera Board Technical Manual

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

S1F77330 Series Technical Manual

S2R72A54 Application Note

S1C17555/565/955/965

S1R72U16 Development Support Manual

S5U1C63000P Manual (S1C63 Family Peripheral Circuit Board)

S1C17W23 EL Lamp Application Notes

RC90 Upgrade Procedures

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

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

LAN Magnetics Solution for 1000BASE-T Evaluation Board TDK Part number: ALT4532-EVA-01

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

Silicon Planar Zener Diode for Low Noise Application. Part No. Cathode Band Package Name Package Code HZ-L Series Navy blue DO-35 GRZZ0002ZB-A 7 B 2

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

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

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

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

DUAL REVERSIBLE MOTOR DRIVER MB3863

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

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

Oscillation stop detection circuit included

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

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

Renesas Starter Kit Sample Code for Cubesuite + Toolchain

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

MTIM Driver for the MC9S08GW64

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

S5U13781R00C10M User Manual

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

S5U13781R01C100 Shield TFT Board for Arduino Due Users Manual

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

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

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

S5U1C63005P Manual (Peripheral Circuit Board for S1C63256)

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

PDB Driver for the MC9S08GW64

APPLICATION NOTE. R8C/LA8A Group. Abstract. Product. Timer RJ in Timer Mode. This document describes timer RJ in timer mode in the R8C/LA8A Group.

Amplifier for versatile fiber-optic links

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

S1R77022 PCB Design Guide

2SK213, 2SK214, 2SK215, 2SK216

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

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

Programming Sharp s Memory LCDs by Ken Green

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

SCI Driver for the MC9S08GW64

IIC Driver for the MC9S08GW64

SEIKO EPSON CORPORATION

Circuit protection elements

DX100 OPTIONS INSTRUCTIONS

2SK1056, 2SK1057, 2SK1058

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

Techniques to Disable Global Interrupts

Atmel AVR1619: XMEGA-B1 Xplained Demonstration. 8-bit Atmel Microcontrollers. Application Note. Features. 1 Introduction

Audio digital potentiometers

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

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

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

Hardware Prerequisites Atmel Xplained Pro Evaluation Kit Atmel WINC1500 extension USB Micro Cable (TypeA / MicroB)

2SK2220, 2SK2221. Silicon N-Channel MOS FET. ADE (Z) 1st. Edition Mar Application. Features. Outline

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

2SB727(K) Silicon PNP Epitaxial. Medium speed and power switching complementary pair with 2SD768(K) Base 2. Collector (Flange) 3.

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

APPLICATION NOTE. Atmel AVR3009: Driving QTouch Device with I 2 C Interface. Atmel QTouch. Introduction

APPLICATION NOTE. Atmel AVR536: Migration from ATmega644 to ATmega644A. 8-bit Atmel Microcontrollers. Introduction

SEGGER J-Link Lite for Renesas Synergy TM

Dot Matrix LCD Controller Driver

HD74AC240/HD74ACT240

RL78 Family Flash Self-Programming Library Type01 Ver.2.21 for the CC-RL compiler

S5U1C63002P Manual (Peripheral Circuit Board for S1C63158/63358)

S1R72V17 CPU Connection Guide

AVR1518: XMEGA-A1 Xplained Training - XMEGA Clock System. 8-bit Atmel Microcontrollers. Application Note. Prerequisites.

Product Guide Microwave Semiconductors

Atmel CryptoAuthentication Starter Kit

1. Overview TPS-1 GUI Configuration Tool Procedure of configure TPS Error Code... 9

Product Guide 2017 Microwave Semiconductors

GIGABIT (10/100/1000 BASE-T QUAD- & DUAL-TRANSFORMER MODULES AND UNFILTERED CONNECTORS

Transcription:

S1C17 Family Application Library S1C17 Series Steps Calculation Library Rev. 2.0

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 dose not assume any responsibility or liability of any kind of damage and/or fire coursed 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 2017, All rights reserved.

Table of Contents 1. Overview...1 2. File Configuration...2 3. Memory Size Requirement...3 4. API Function List...4 5. Operation Flow...5 6. API Function Details...6 PEDReset... 6 PEDInit... 6 PEDClear... 6 PEDMeas... 7 PEDSetParam... 8 PEDGetWalkStep... 8 PEDGetWalkDist... 9 PEDGetWalkTime... 9 PEDGetExercise... 9 PEDGetCalorie... 10 PEDGetFat... 10 PEDGetWalkSpeed... 10 PEDGetMETs... 11 PEDGetCadence... 11 Revision History...12 S1C17 Series Steps Calculation Library Seiko Epson Corporation i

1. Overview 1. Overview This manual is intended to describe the specification for Epson's original steps calculation library for S1C17 series that is used to calculate the number of steps, walking distance, consumed calories, and others based on the tri-axis acceleration input. This section describes the features of this library. 1) Steps calculation with wrist mount is supported In the steps calculation, this library supports not only the mounting on the body trunk, such as the chest and waist, and installation in a bag or pocket but also the wrist mount. 2) False detection due to other than walking vibration is suppressed The algorithm is adopted that enables stable steps calculation by suppressing the false step detection due to other than walking vibration, such as a car. 3) Walking speed is automatically estimated The walking distance, exercise, and others are calculated by estimating walking speed based on the user's body height and weight. The table below lists the I/O data specification of this library. Table 1-1 I/O data specification Item Specification Remarks Input acceleration Accelerometer: Tri-axis x 16 bit The acceleration range is selectable Sampling: 25 Hz Acceleration range: ±4 G/±8 G/±16 G Item calculated Number of steps The data is updated each time a step Walking distance [1/256 m] Walking speed [1/256 m/s] Walking duration [sec] is detected The data is updated every second Exercise [1/256] Consumed calories [1/256 Kcal] Amount of fat burnt [1/256 g] METs [1/256] S1C17 Series Steps Calculation Library Seiko Epson Corporation 1

2. File Configuration 2. File Configuration This section describes the file configuration of the S1C17 series steps calculation library. File PedoLib/ pedo.c pedo.h calo.c calo.h walkdist.c walkdist.h stepcade.c stepcade.h steplib.c steplib.h steplibdef.h Table 2-1 File configuration Steps calculation library folder Steps calculation program Steps calculation header file Consumed calories calculation program Header file for consumed calories calculation Walking distance calculation program Header file for walking distance calculation Cadence calculation program Header file for cadence calculation Walking detection program Walking detection header file Header file for internal library variables 2 Seiko Epson Corporation S1C17 Series Steps Calculation Library

3. Memory Size Requirement 3. Memory Size Requirement The table below lists the memory sizes required by the S1C17 series steps calculation library. Table 3-1 Memory size requirement Section name Size (Byte).bss 80 Variable without initial value.data 0 Variable with initial value.rodata 166 Constant table.text 3868 Program S1C17 Series Steps Calculation Library Seiko Epson Corporation 3

4. API Function List 4. API Function List The table below lists the API functions supported by the S1C17 series steps calculation library. API function PEDReset PEDInit PEDClear PEDMeas PEDSetParam PEDGetWalkStep PEDGetWalkDist PEDGetWalkTime PEDGetExercise PEDGetCalorie PEDGetFat PEDGetWalkSpeed PEDGetMETs PEDGetCadence Table 4-1 API Function List Functional overview Initializes all variables. Initializes variables except for calculated values, such as the number of steps and consumed calories. Initializes calculated values to zero, such as the number of steps and consumed calories. The steps are calculated based on the acceleration data sampled at 25 Hz. Sets the user's body height and weight. Gets the number of steps calculated. Gets the walking distance calculated. Gets the walking duration calculated. Gets the walking exercise calculated. Gets the consumed calories by the walking calculated. Gets the amount of fat burnt by the walking calculated. Gets the walking speed calculated. Gets METs of the walking calculated. Gets the walking cadence calculated. 4 Seiko Epson Corporation S1C17 Series Steps Calculation Library

5. Operation Flow 5. Operation Flow This section describes basic operation flow of the S1C17 series steps calculation library. Start steps calculation Figure 5-1 Basic operation flow 1) Initialization PEDInit 1) Initialize the steps calculation function upon startup of calculation. 2) Parameter setting PEDSetParam 2) Set the body height and weight, if needed. 3) Initializing calculated values to zero PEDClear 3) Initialize the calculated values to zero, if needed. Loop (25 Hz) 4) Calculation process PEDMeas 4) Perform the calculation based on the input of acceleration data sampled at 25 Hz. 5) Getting calculated values PEDGetWalkStep PEDGetWalkDist PEDGetWalkTime PEDGetExercise PEDGetCalorie PEDGetFat...... 5) Get the calculation result, if needed. Loop (25 Hz) Stop steps calculation S1C17 Series Steps Calculation Library Seiko Epson Corporation 5

6. API Function Details 6. API Function Details PEDReset Format void PEDReset(void) This function initializes all internal variables. Basically, this function is performed once at system startup. To initialize only the calculated data (number of steps, walking duration, walking distance, exercise amount, consumed calories, and amount of fat burnt) and calculation state, perform the PEDClear and PEDInit functions. PEDInit Format void PEDInit(void) This function performs the initialization process required when restarting from stopped state. The calculated data (number of steps, walking duration, walking distance, exercise amount, consumed calories, and amount of fat burnt) is not initialized. PEDClear Format void PEDClear(void) 6 Seiko Epson Corporation S1C17 Series Steps Calculation Library

6. API Function Details The calculated data accumulated (number of steps, walking duration, walking distance, exercise amount, consumed calories, and amount of fat burnt) is cleared by zero. Also, METs is cleared to 1.0. PEDMeas Format int PEDMeas(short ai16xyz[3], int iradixpt) ai16xyz[3] iradixpt Tri-axis acceleration data sampled at 25 Hz Number of bits for fractional part of numeric value corresponding to 1 G of acceleration data Specify a number from 11 to 13 according to the table below Table 6-1 Setting value of argument iradixpt Measurement range of Sensor value accelerometer corresponding to 1 G iradixpt value ±4 G 8192 13 ±8 G 4096 12 ±16 G 2048 11 The return value represents whether the calculated information is updated. The value represents whether the number of steps, walking distance, consumed calories, and others are updated. One if the calculated information is updated, and zero otherwise. Table 6-2 Return value of function PEDMeas Update of steps calculation 0 1 Yes The walking distance, consumed calories, and others are calculated by calculating the number of steps based on the tri-axis acceleration data sampled at 25 Hz. Call this function at the same sampling frequency of 25 Hz as the acceleration data. The number of steps, walking speed, walking distance, and walking duration are updated each time a step is detected. The exercise amount, consumed calories, amount of fat burnt, and METs are updated every second while detecting steps. Also, the calculated values are updated even when the user stops. S1C17 Series Steps Calculation Library Seiko Epson Corporation 7

6. API Function Details PEDSetParam Format void PEDSetParam(int iheight, int iweight) iheight Body height (cm) (setting range: 120 to 255) iweight Body weight (kg) (setting range: 0 to 255) This function sets the user's body height and weight. Here, these setting values are initialized to defaults (body height: 165 cm, body weight: 60 kg) when the PEDReset function is performed. If the setting value is out of range, the value is clipped to upper or lower limit. PEDGetWalkStep Format unsigned long PEDGetWalkStep(void) Returns the number of steps calculated. Returns the accumulated number of steps calculated from the time initialized by the PEDClear function up to now. This function is executable asynchronously with the interrupt handler. 8 Seiko Epson Corporation S1C17 Series Steps Calculation Library

6. API Function Details PEDGetWalkDist Format unsigned long PEDGetWalkDist(void) Returns the walking distance. The unit is meter (m) and fractional part is represented in 8 bits (Q8 format). Returns the accumulated walking distance calculated from the time initialized by the PEDClear function up to now. This function is executable asynchronously with the interrupt handler. PEDGetWalkTime Format unsigned long PEDGetWalkTime(void) Returns the walking duration. The unit is second. Returns the accumulated walking duration calculated from the time initialized by the PEDClear function up to now. This function is executable asynchronously with the interrupt handler. PEDGetExercise Format unsigned long PEDGetExercise(void) Returns the exercise. The fractional part is represented in 8 bits (Q8 format). Returns the exercise amount calculated from the time initialized by the PEDClear function up to now. This function is executable asynchronously with the interrupt handler. S1C17 Series Steps Calculation Library Seiko Epson Corporation 9

6. API Function Details PEDGetCalorie Format unsigned long PEDGetCalorie(void) Returns the consumed calories. The unit is Kcal and fractional part is represented in 8 bits (Q8 format). Returns the consumed calories calculated from the time initialized by the PEDClear function up to now. This function is executable asynchronously with the interrupt handler. PEDGetFat Format unsigned long PEDGetFat(void) Returns the amount of fat burnt. The unit is gram (g) and fractional part is represented in 8 bits (Q8 format). Returns the amount of fat burnt calculated from the time initialized by the PEDClear function up to now. This function is executable asynchronously with the interrupt handler. PEDGetWalkSpeed Format unsigned short PEDGetWalkSpeed(void) Returns current walking speed. The unit is m/sec and fractional part is represented in 8 bits (Q8 format). Current walking speed is returned. Zero is returned at a stop. 10 Seiko Epson Corporation S1C17 Series Steps Calculation Library

6. API Function Details PEDGetMETs Format unsigned short PEDGetMETs(void) Returns METs of current walking. The fractional part is represented in 8 bits (Q8 format). Returns METs of current walking. The number 1.0 (0x100) is returned at a stop. PEDGetCadence Format unsigned char PEDGetCadence(void) Returns the cadence of current walking (steps/minute). Returns the cadence of current walking. Zero is returned at a stop. S1C17 Series Steps Calculation Library Seiko Epson Corporation 11

Revision History Revision History Rev. No. Date Page Category Contents Rev. 1.0 2014/10/15 All New Attachment-1 Rev. 2.0 2017/09/21 2 Addition Added cadence calculation program and header files. 3 to 6 Revision Changed the chapter numbers. 3 Revision Changed the sizes listed in Table 3-1. 4, 11 Addition Added the PEDGetCadence function. 12 Seiko Epson Corporation S1C17 Series Steps Calculation Library

International Sales Operations AMERICA EPSON ELECTRONICS AMERICA, INC. 214 Devcon Drive, San Jose, CA 95112, 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. 4th Floor, Tower 1 of China Central Place, 81 Jianguo Road, Chaoyang District, Beijing 100025 China Phone: +86-10-8522-1199 FAX: +86-10-8522-1120 SHANGHAI BRANCH Room 1701 & 1704, 17 Floor, Greenland Center II, 562 Dong An Road, Xu Hui District, Shanghai, CHINA Phone: +86-21-5330-4888 FAX: +86-21-5423-4677 SHENZHEN BRANCH Room 804-805, 8 Floor, Tower 2, Ali Center, No.3331 Keyuan South RD (Shenzhen bay), Nanshan District, Shenzhen 518054, CHINA Phone: +86-10-3299-0588 FAX: +86-10-3299-0560 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 19F, 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. SALES & MARKETING DIVISION Device Sales & Marketing Department 421-8, Hino, Hino-shi, Tokyo 191-8501, JAPAN Phone: +81-42-587-5816 FAX: +81-42-587-5116 Document Code: 412861901 First Issue October 2014 V Revised October 2017 in JAPAN L