In timer mode, choose functions from those listed in Table 1. Operations of the circled items are described below.

Similar documents
Operation of Timer A (2-phase pulse signal process in event counter mode, multiply-by-4 processing operation)

This document describes a program for timer RA in pulse period measurement mode.

M32C/84, 85, 86, 87, 88 Group

M32C/84, 85, 86, 87, 88 Group

This document describes a program for timer RF in pulse width measurement mode.

Data Transfer between On-chip RAM Areas with DMAC (Burst Mode) 1. Introduction Description of Sample Application... 3

Old Company Name in Catalogs and Other Documents

SPI Overview and Operation

Old Company Name in Catalogs and Other Documents

M16C/Tiny Series APPLICATION NOTE. Operation of Timer A. (2-Phase Pulse Signal Process in Event Counter Mode, Multiply-by-4 Mode) 1.

Old Company Name in Catalogs and Other Documents

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

Old Company Name in Catalogs and Other Documents

DATA SHEET ZENER DIODES 1.0 W PLANAR TYPE 2-PIN SMALL POWER MINI MOLD. Parameter Symbol Ratings Unit Remarks

Old Company Name in Catalogs and Other Documents

Old Company Name in Catalogs and Other Documents

Old Company Name in Catalogs and Other Documents

Old Company Name in Catalogs and Other Documents

Old Company Name in Catalogs and Other Documents

The following article describes how to use the M16C/62 timers A s as square wave generators (Pulse Output Mode).

Old Company Name in Catalogs and Other Documents

ESD NOISE CLIPPING DIODE NNCD2.0DA to NNCD39DA

REJ10J I/O DLL Kit. User's Manual. Simulator Debugger Customizing Kit

Old Company Name in Catalogs and Other Documents

Old Company Name in Catalogs and Other Documents

Old Company Name in Catalogs and Other Documents

Renesas E8 On-Chip Debugging Emulator

1. Specification Applicable Conditions Description of Modules Used Principles of Operation... 9

This document describes how to set up and use the timer RA in timer mode on the R8C/25 Group device.

M32C/84 Group APPLICATION NOTE. Operation of timer A (2-phase pulse signal process in event counter mode, normal mode selected) 1.

SuperH RISC engine C/C++ Compiler Package

Renesas E10A-USB Emulator

M32C Simulator Debugger V.1.03

This document describes how to set up and use the timer RB in programmable one-shot generation mode on the R8C/25 Group device.

Old Company Name in Catalogs and Other Documents

Old Company Name in Catalogs and Other Documents

E1/E20 Emulator Additional Document for User s Manual (RX User System Design)

REJ10J High-performance Embedded Workshop V User's Manual. Renesas Microcomputer Development Environment System

In repeat transfer mode of DMAC, choose functions from those listed in Table 1. Operations of the checked items are described below.

Old Company Name in Catalogs and Other Documents

M16C/26 APPLICATION NOTE. Using the M16C/26 Timer in Event Counter Mode. 1.0 Abstract. 2.0 Introduction

38K2 Group User's Manual

M3H Group(2) Application Note Asynchronous Serial Communication Circuit (UART-C)

EOL announced Product. Old Company Name in Catalogs and Other Documents

Old Company Name in Catalogs and Other Documents

This application note describes the time measurement function of Timer S with the gate function.

3. Absolute Maximum Ratings (Note) (Unless otherwise specified, T a = 25 ) Symbol V ESD. P PK I PP T j T stg

Asynchronous Transfer of Data with Appended CRC Codes via an SCI Interface

Old Company Name in Catalogs and Other Documents

M3H Group(1) Application Note. I 2 C Interface (I2C-B) MASTER/SLAVE

Integrated Development Environment

M3H Group(2) Application Note 12-bit Analog to Digital Converter (ADC-A)

DF10G7M1N DF10G7M1N. 1. Applications. 2. Packaging and Internal Circuit Rev.5.0. Start of commercial production

RL78 Family. User s Manual. Flash Self-Programming Library Type Bit Single-Chip Microcontrollers. Rev.1.04 Dec 2016.

M16C R8C FoUSB/UART Debugger. User Manual REJ10J

Old Company Name in Catalogs and Other Documents

DF2S6.8FS DF2S6.8FS. 1. Applications. 2. Packaging and Internal Circuit Rev.5.0. Start of commercial production.

32Mb Advanced LPSRAM (2M word x 16bit / 4M word x 8bit)

M3H Group(1) Application Note I 2 C Interface (I2C-B)

PoExtBusOC16-CNC User s manual

Old Company Name in Catalogs and Other Documents

Drop-In Replacement: CG2163X3. Part Number Order Number Package Marking Supplying Form G4X CAUTION

TA75W393FU TA75W393FU. Dual Voltage Comparator. Features. Marking (Top View) Pin Connection (Top View)

H8SX Family APPLICATION NOTE. Vector Table Address Switching. Introduction. Target Devices. Contents

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

TC4049BP,TC4049BF, TC4050BP,TC4050BF

A 24-hour clock (which is updated at 1-minute intervals) is created by using the 32K timer.

TOSHIBA CMOS Digital Integrated Circuit Silicon Monolithic TC7SGU04FU IN A GND

SuperH RISC engine C/C++ Compiler Package

DF2B6M4SL DF2B6M4SL. 1. General. 2. Applications. 3. Features. 4. Packaging Rev.4.0. Start of commercial production

TCS40DPR. Digital Output Magnetic Sensor. Feature. Marking Pin Assignment (Top View) Function Table PA8

M16C/26 APPLICATION NOTE. Using Timer B in Pulse Period/Width Measurement Mode. 1.0 Abstract. 2.0 Introduction

TOSHIBA Zener Diode Silicon Epitaxial Type. CRY62 to CRZ39

RN1601, RN1602, RN1603 RN1604, RN1605, RN1606

MSM GENERAL DESCRIPTION FEATURES. Single Rail CODEC

Audio digital potentiometers

M16C R8C FoUSB/UART Debugger. User s Manual REJ10J

Stepping motor driver

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

DF2S16FS DF2S16FS. 1. Applications. 2. Packaging and Internal Circuit Rev Toshiba Corporation

M3H Group(2) Application Note I 2 C Interface (I2C-B) arbitration

DALI Master Controller GUI

UnRegistered MB39C602 LED LIGHTING SYSTEM BULB 9W ZIGBEE CONTROL USER MANUAL. Fujitsu Semiconductor Design (Chengdu) Co. Ltd.

M16C/62 APPLICATION NOTE. Using the M16C/62 CRC. 1.0 Abstract. 2.0 Introduction. 3.0 A Lesson in CRC and the CCITT Polynomial

TBD62785APG, TBD62785AFWG

SH7080/SH7146/SH7125/SH7200 Series

Renesas Starter Kit Sample Code for Cubesuite + Toolchain

M16C/62 APPLICATION NOTE. Using the M16C/62 DMAC in Forward Source Mode. 1.0 Abstract. 2.0 Introduction

1. Specification Applicable conditions Description of Modules Used Principles of Operation... 8

M16C/60 Series and M16C/20 Series

Flash Self-programming Library

RN1101MFV,RN1102MFV,RN1103MFV RN1104MFV,RN1105MFV,RN1106MFV

This document describes how to set up and use the timer RA in timer mode on the R8C/25 Group device.

M32C/84 Group APPLICATION NOTE. Operation of Key-Input Interrupt. 1. Abstract. 2. Introduction

SEGGER J-Link Lite for Renesas Synergy TM

Linear codec IC for digital cellular telephones

32176 Group APPLICATION NOTE. Application of the CAN Module (Remote Frame Transmission) 1. Overview. 2. Introduction

Application Note. Synchronous Operation Mode

LAPIS Semiconductor ML9298

ROHM USB Type-C Power Delivery. Evaluation Board Manual BM92A15MWV-EVK-001

Transcription:

APPLICATION NOTE M16C/64 Group 1. Abstract In timer mode, choose functions from those listed in Table 1. Operations of the circled items are described below. 2. Introduction This application note is applied to the M16C/64 group microcomputers. This program can be operated under the condition of M16C family products with the same SFR (Special Function Register) as M16C/64 Group products. Because some functions may be modified of the M16C family products, see the user s manual. When using the functions shown in this application note, evaluate them carefully for an operation. REC5B54-1/Rev.1. June 28 Page 1 of 9

3. Chosen functions Table 1. Chosen functions Item Set-up O Internal count (f1timab/f2timab/f8timab/f32timab/f64timab/foco-s/fc32) Pulse output function O No pulse output Gate function Pulses output No gate function Performs count only for the period in which the TAiIN pin is at L level O Performs count only for the period in which the TAiIN pin is at H level Output polar control O Output waveform H active Output waveform L active (output reversed) Note: i=~4 4. Operation (1) When the count start flag is set to 1 and the TAiIN pin inputs at H level, the counter performs a down count on the count. (2) When the TAiIN pin inputs at L level, the counter stops and holds its value. (3) If an underflow occurs, the content of the reload register is reloaded to the counter, and the count continues. At this time, the timer Ai interrupt request bit goes to 1. (4) Setting the count start flag to causes the counter to stop and to hold its value. Note: Make the pulse width of the signal input to the TAiIN pin not less than two cycles of the count. Figure 1 shows the operation timing. Figure 1. Operation timing of timer mode, gate function selected REC5B54-1/Rev.1. June 28 Page 2 of 9

5. Set-up procedure Table 2 shows Timer A count, Figure 2 shows block diagram of Timer A count in timer mode. Table 2. Source Selection of Timer A TACSj register (Note 1) TAiMR register period TCS3/ TCS7 TCS2/ TCS6 TCS1/ TCS5 TCS/ TCS4 TCK1 TCK f(pll):24mhz f(xcin):32.768khz - - - f1timab/f2timab 41.7ns or 83.3ns (Note 2) - - - 1 f8timab 333.3ns - - - 1 f32timab 1333.3ns - - - 1 1 fc32 976.56µs 1 - - f1timab/f2timab 41.7ns or 83.3ns (Note 2) 1 1 - - f8timab 333.3ns 1 1 - - f32timab 1333.3ns 1 1 1 - - f64timab 2666.7ns 1 1 1 - - foco-s About 8µs 1 1 1 - - fc32 976.56µs Note 1: TCS3~TCS bits of TACS register correspond to Timer A count selection, TCS7~TCS4 bits of TACS register correspond to Timer A1 count selection, TCS3~TCS bits of TACS1 register correspond to Timer A2 count selection, TCS7~TCS4 bits of TACS1 register correspond to Timer A3 count selection, and TCS3~TCS bits of TACS2 register correspond to Timer A4 count selection. Note 2: When the PCLK bit in the PCLKR register is 1, the selected clock is f1timab. When the PCLK bit is, the selected clock is f2timab. f1timab or f2timab f8timab f32timab f64timab foco-s fc32 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 TCK (TAMR) TCS2~ TCS (TACS) TCK (TA1MR) TCS6~ TCS4 (TACS) TCK (TA2MR) TCS2~ TCS (TACS1) TCK (TA3MR) TCS6~ TCS4 (TACS1) TCK (TA4MR) TCS2~ TCS (TACS2) 1 TCS3 (TACS) Timer A 1 TCS7 (TACS) Timer A1 1 TCS3 (TACS1) Timer A2 1 TCS7 (TACS1) Timer A3 1 TCS3 (TACS2) Timer A4 Figure 2. of Timer A REC5B54-1/Rev.1. June 28 Page 3 of 9

Selecting timer count TACS register can select Timer A and Timer A1 count, TACS1 can select Timer A2 and Timer A3 count, and TACS2 can select Timer A4 count suorce. b Timer A count select register [Address 1Dh] Timer A count select register 1 [Address 1D1h] TACS TACS1 TAi count select bit (Note1) b2 b1 b : f1timab or f2timab (Note2) 1 : f8timab 1 : f32timab 1 1 : f64timsb 1 : Do not set 1 1 : foco-s 1 1 : fc32 1 1 1 : Do not set TAi count option specified bit (Note1) : TCK, TCK1 enabled, TCS to TCS2 disabled TAj count select bit (Note1) b2 b1 b : f1timab or f2timab (Note2) 1 : f8timab 1 : f32timab 1 1 : f64timsb 1 : Do not set 1 1 : foco-s 1 1 : fc32 1 1 1 : Do not set TAj count option specified bit (Note1) : TCK, TCK1 enabled, TCS4 to TCS6 disabled TACS register: i =, j = 1, TACS1 register: i = 2, j = 3 Note 1: About the count period, please refer to Table 2. Note 2: When the PCLK bit in the PCLKR register is 1, the selected clock is f1timab. When the PCLK bit is, the selected clock is f2timab. b Timer A count select register 2 [Address 1D2h] TACS2 TA4 count select bit (Note1) b2 b1 b : f1timab or f2timab (Note2) 1 : f8timab 1 : f32timab 1 1 : f64timsb 1 : Do not set 1 1 : foco-s 1 1 : fc32 1 1 1 : Do not set TA4 count option specified bit (Note1) : TCK, TCK1 enabled, TCS to TCS2 disabled No register bits. If necessary, set to. Read as undefined value. Note 1: About the count period, please refer to Table 2. Note 2: When the PCLK bit in the PCLKR register is 1, the selected clock is f1timab. When the PCLK bit is, the selected clock is f2timab. REC5B54-1/Rev.1. June 28 Page 4 of 9

Selecting timer mode and functions 1 1 b Timer Ai mode register (i= to 4) [Address 336h to 33Ah] TAiMR (i= to 4) Selection of timer mode Pulse output function select bit : Pulse is not output (TAiOUT pin is a normal port pin) Gate function select bit b4 b3 1 1 : Timer counts only when TAiIN pin is held H (Note1) (Must always be in timer mode) select bit (Note2) b6 : f1timab or f2timab (Note3) 1 : f8timab 1 : f32timab 1 1 : fc32 Note 1: Set the corresponding port direction register to. Note 2: Valid when the TCS3 bit or TCS7 bit in registers TACS to TACS2 is set to (TCK, TCK1 enabled). About the count period, please refer to Table 2. Note 3: When the PCLK bit in the PCLKR register is 1, the selected clock is f1timab. When the PCLK bit is, the selected clock is f2timab. Selecting waveform output function b Timer A waveform output function select register [Address 1D5h] TAPOFS TAOUT output polar control bit : Output waveform H active TA1OUT output polar control bit : Output waveform H active TA2OUT output polar control bit : Output waveform H active TA3OUT output polar control bit : Output waveform H active TA4OUT output polar control bit : Output waveform H active No register bits. If necessary, set to. Read as undefined value. Setting counter value (b15) (b8) b Timer A register [Address 327h, 326h] b Timer A1 register [Address 329h, 328h] Timer A2 register [Address 32Bh, 32Ah] Timer A3 register [Address 32Dh, 32Ch] Timer A4 register [Address 32Fh, 32Eh] Can be set to h to FFFFh TA TA1 TA2 TA3 TA4 REC5B54-1/Rev.1. June 28 Page 5 of 9

Setting clock prescaler reset flag (This function is effective when fc32 is selected as the count. Reset the prescaler for generating fc32 by dividing the XcIN by 32.) b prescaler reset flag [Address 15h] CPSRF Clock prescaler reset flag : No effect 1 : Prescale is reset (When read, the value is ) Setting count start flag b start flag [Address 32h] TABSR Timer A count start flag Timer A1 count start flag Timer A2 count start flag Timer A3 count start flag Timer A4 count start flag Start count REC5B54-1/Rev.1. June 28 Page 6 of 9

6. Reference Hardware manual M16C/64 Group Hardware Manual (Use the most recent version of the document on the Renesas Technology Web site.) Technical news/technical update (Use the most recent version of the document on the Renesas Technology Web site.) Web-site and contact for support Renesas Technology Web site http://www.renesas.com/ Inquiries http://www.renesas.com/inquiry csc@renesas.com REC5B54-1/Rev.1. June 28 Page 7 of 9

Revision Revised Rev. Issue date Page Point 1. 28.6 - First edition issued All trademarks and registered trademarks are the property of their respective owners. REC5B54-1/Rev.1. June 28 Page 8 of 9

Notes regarding these materials 1. This document is provided for reference purposes only so that Renesas customers may select the appropriate Renesas products for their use. Renesas neither makes warranties or representations with respect to the accuracy or completeness of the information contained in this document nor grants any license to any intellectual property rights or any other rights of Renesas or any third party with respect to the information in this document. 2. Renesas shall have no liability for damages or infringement of any intellectual property or other rights arising out of the use of any information in this document, including, but not limited to, product data, diagrams, charts, programs, algorithms, and application circuit examples. 3. You should not use the products or the technology described in this document for the purpose of military applications such as the development of weapons of mass destruction or for the purpose of any other military use. When exporting the products or technology described herein, you should follow the applicable export control laws and regulations, and procedures required by such laws and regulations. 4. All information included in this document such as product data, diagrams, charts, programs, algorithms, and application circuit examples, is current as of the date this document is issued. Such information, however, is subject to change without any prior notice. Before purchasing or using any Renesas products listed in this document, please confirm the latest product information with a Renesas sales office. Also, please pay regular and careful attention to additional and different information to be disclosed by Renesas such as that disclosed through our website. (http://www.renesas.com) 5. Renesas has used reasonable care in compiling the information included in this document, but Renesas assumes no liability whatsoever for any damages incurred as a result of errors or omissions in the information included in this document. 6. When using or otherwise relying on the information in this document, you should evaluate the information in light of the total system before deciding about the applicability of such information to the intended application. Renesas makes no representations, warranties or guaranties regarding the suitability of its products for any particular application and specifically disclaims any liability arising out of the application and use of the information in this document or Renesas products. 7. With the exception of products specified by Renesas as suitable for automobile applications, Renesas products are not designed, manufactured or tested for applications or otherwise in systems the failure or malfunction of which may cause a direct threat to human life or create a risk of human injury or which require especially high quality and reliability such as safety systems, or equipment or systems for transportation and traffic, healthcare, combustion control, aerospace and aeronautics, nuclear power, or undersea communication transmission. If you are considering the use of our products for such purposes, please contact a Renesas sales office beforehand. Renesas shall have no liability for damages arising out of the uses set forth above. 8. Notwithstanding the preceding paragraph, you should not use Renesas products for the purposes listed below: (1) artificial life support devices or systems (2) surgical implantations (3) healthcare intervention (e.g., excision, administration of medication, etc.) (4) any other purposes that pose a direct threat to human life Renesas shall have no liability for damages arising out of the uses set forth in the above and purchasers who elect to use Renesas products in any of the foregoing applications shall indemnify and hold harmless Renesas Technology Corp., its affiliated companies and their officers, directors, and employees against any and all damages arising out of such applications. 9. You should use the products described herein within the range specified by Renesas, especially with respect to the maximum rating, operating supply voltage range, movement power voltage range, heat radiation characteristics, installation and other product characteristics. Renesas shall have no liability for malfunctions or damages arising out of the use of Renesas products beyond such specified ranges. 1. Although Renesas endeavors to improve the quality and reliability of its products, IC products have specific characteristics such as the occurrence of failure at a certain rate and malfunctions under certain use conditions. Please be sure to implement safety measures to guard against the possibility of physical injury, and injury or damage caused by fire in the event of the failure of a Renesas product, such as safety design for hardware and software including but not limited to redundancy, fire control and malfunction prevention, appropriate treatment for aging degradation or any other applicable measures. Among others, since the evaluation of microcomputer software alone is very difficult, please evaluate the safety of the final products or system manufactured by you. 11. In case Renesas products listed in this document are detached from the products to which the Renesas products are attached or affixed, the risk of accident such as swallowing by infants and small children is very high. You should implement safety measures so that Renesas products may not be easily detached from your products. Renesas shall have no liability for damages arising out of such detachment. 12. This document may not be reproduced or duplicated, in any form, in whole or in part, without prior written approval from Renesas. 13. Please contact a Renesas sales office if you have any questions regarding the information contained in this document, Renesas semiconductor products, or if you have any other inquiries. 28. Renesas Technology Corp., All rights reserved. REC5B54-1/Rev.1. June 28 Page 9 of 9