Toshiba SP-900-011 User's Guide
Summary
This sample program provides developers targeting the TLCS-900/H microcontroller series with a precise solution for measuring pulse widths. This documentation details implementation using a 16-bit timer and an 8-bit event counter, enabling accurate capture of external high-level pulse widths. It guides users through hardware setup (free-running up counter mode) and software logic, including interrupt handlers (INT5), essential data registers (gCAP1, gCAP2), and variable management for reliable timing calculations. Ideal for engineers requiring high-fidelity pulse analysis in electronic or industrial systems.
Page 1 Text Content
TLCS-900/H Sample Program Description
SP-900-011
PLWDMSR --Measuring Pulse Width Using 16-bit Timer-- Rev 1.1 Dec. 2005
1. Target MCU
This sample program is created targetting at the TLCS-900/H series. When using an MCU other than the TLCS-900/H series, refer to the data sheet for that MCU.
2. Overview
This sample program measures a pulse width using a 16-bit timer.
3. Description
The program measures a pulse width using a 16-bit timer in event counter mode with an 8-bit timer. It can measure the high-level width of an external pulse. The following describes timer 8 and timer 0/1 as an example.
To use the program, the UC8 16-bit up counter must be operating in free running mode using the internal clock. The program triggers capturing at the rising and falling edges of the external pulses on the TI8 pin and fetches the up counter value into the CAP1 and CAP2 capture registers, respectively. The INT5 interrupt handler calculates the difference between the CAP1 and CAP2 and multiplies the difference by the internal clock period to obtain the high-level width.
Copyright© TOSHIBA CORPORATION 2005 All rights Reserved.
Page Summary Contents For Toshiba SP-900-011 User's Guide
Manual Details
| Brand | Toshiba |
|---|---|
| Pages | 3 |
| File Size | 58.43 KB |
| Published | June 02, 2026 |
Enter the captcha to get the download link:
Frequently Asked Questions
What series of MCU does this program target?
The sample program targets the TLCS-900/H series.
How does the program measure pulse width?
It uses a 16-bit up counter in free running mode, capturing rising and falling edges, and calculating the difference via an interrupt handler.
What precautions must buyers take when using the product?
The buyer is responsible for ensuring safe design compliance and avoiding situations where failure could cause injury or property damage.
In what types of equipment are these products intended for use?
They are generally intended for electronics applications such as computer, office, industrial robotics, and measuring equipment.