| công cụ tìm kiếm bảng dữ liệu linh kiện điện tử |
|
MPD78CP14KB bảng dữ liệu(PDF) 97 Page - NEC |
|
|
|||||||||||||||||||||||||||||
MPD78CP14KB bảng dữ liệu(HTML) 97 Page - NEC |
|
97 / 373 page ![]() CHAPTER 5 TIMER FUNCTIONS 79 5.3 Timer Operations Interval timer operation is performed for the two timers using the following input clocks according to the specification of the timer mode register (TMM). (1) Internal clock ( φ12) When the internal clock ( φ12) is specified as the upcounter input clock, the timer operates as an interval timer with an interval from 1 µs to 256 µs (at 12 MHz operation) with a 1 resolution of 1 µs. (2) Internal clock ( φ384) When the internal clock ( φ384) is specified as the upcounter input clock, an interval time from 32 µs to 8.192 ms can be selected (at 12 MHz operation) with a resolution of 32 µs. (3) External pulse (TI) When an external pulse (TI input) is specified as the upcounter input clock, the timer operates as an interval timer of any desired resolution. Also, when the upcounter counts external pulses up to the value set in timer REG0/1 (TM0/TM1), it can also be used as an event counter which generates internal timer interrupts (INTT0/ INTT1). However, it is not possible to read the count data (the upcounter contents) during the count. To prevent errors due to noise signals in the TI pin, sampling is performed by a sampling pulse with a 1-state (250 ns: 12 MHz) cycle. Thus an input signal of less than 1 state is eliminated, and a high level or low level duration of 2 states or more is necessary for a signal to be acknowledged as a TI pin input signal. The upcounter count operation is performed by falling edge input on the TI pin. (4) TIMER0 output (can only be specified for TIMER1) This can only be specified for TIMER1. The timer operates as a 16-bit interval timer which counts TIMER0 match signals as the TIMER1 upcounter input. An interval from 1 µs to 65.536 ms or from 32 µs to 2.1 s can be selected (at 12 MHz operation). Since both TIMER0 and TIMER1 perform the same operation, TIMER0 operation is described here. Interval timer operation is started by setting the count value in timer REG0 and writing the necessary data to the timer mode register. The upcounter counts up every input clock cycle, while the comparator constantly compares the contents of the counting upcounter and the contents of timer REG0, and generates an internal interrupt (INTT0) if they match. When a match occurs, the upcounter is cleared and the count-up starts again from 00H. Thus TIMER0 functions as an interval timer which generates repeated interrupt requests using the value set in timer REG0 as the interval. When timer REG0 is set, an interrupt is generated on the 256th count. Cautions 1. When data is written to timer REG0, output of the comparator match signal is disabled, and therefore INTT0 is not generated. 2. After RESET input, the contents of TM0 are undefined. Ensure that TM0 initialization is performed by the program before the timer is started. When the TIMER0 match signal is selected as the timer F/F input and the upcounter contents and the timer REG0 contents match, the timer F/F contents are inverted and a square wave can be output from the TO pin. The pulse width of the square wave output to the TO pin is determined by the count value set in timer REG0. If 0 is set, the timer F/F contents are inverted and INTT0 is generated by the comparator match signal generated every 256 counts. The INTT0 timer interrupt is disabled by setting MKT0 (bit 1 of the interrupt mask register MKL). |
|
Link URL |
| Cho đến nay ALLDATASHEET có giúp ích cho doanh nghiệp của bạn hay không? [ DONATE ] |
Alldatasheet là | Quảng cáo | Liên lạc với chúng tôi | Chính sách bảo mật | Liên kết đến bảng dữ liệu | Trao đổi link | Tìm kiếm theo nhà sản xuất All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |