參數(shù)資料
型號: MC68HC05G1B
廠商: MOTOROLA INC
元件分類: 微控制器/微處理器
英文描述: 8-BIT, MROM, 2.1 MHz, MICROCONTROLLER, PDIP56
封裝: SDIP-56
文件頁數(shù): 78/124頁
文件大?。?/td> 732K
代理商: MC68HC05G1B
MC68HC05G1
MOTOROLA
7-3
PROGRAMMABLE TIMER
7
7.1
Counter
Counter Register location
High byte - $18, Low byte - $19
Alternate Counter Register
High byte - $1A
Low byte - $1B
The key element in the programmable timer is a 16-bit, free-running counter or counter register,
preceded by a prescaler that divides the internal processor clock by four. The prescaler gives the
timer a resolution of 3.472
s if the internal bus clock is 1.152MHz. The counter is incremented
during the low portion of the internal bus clock. Software can read the counter at any time without
affecting its value.
The double-byte, free-running counter can be read from either of two locations, $18 & $19 (counter
register) or $1A & $1B (counter alternate register). Reading only the least signicant byte (LSB)
of the free-running counter ($19 or $1B) receives the count value at the time of the read. If the
most signicant byte (MSB) ($18 or $1A) is read rst, the LSB ($19 or $1B) is transferred to a
buffer. This buffer value remains xed after the rst MSB read, even if the MSB is read several
times. This buffer is accessed when the LSB ($19 or $1B) is read, and thus, completes a read
sequence of the complete counter value.
Reading the timer counter register low byte after reading the timer status register clears the timer
overow ag (TOF), but reading the counter alternate register does not affect TOF. Therefore, the
counter alternate register can be read any time without risk of missing timer overow interrupts
due to a cleared TOF.
The free-running counter is preset to $FFFC during reset and is always a read-only register.
During a power-on reset, the counter is also preset to $FFFC and begins running after the
oscillator start-up delay. The value in the free-running counter repeats every 262144 internal bus
clock cycles. TOF is set when the counter overows (from $FFFF to $0000); this will cause an
interrupt if TOIE (bit 5 of Timer Control register) is set.
In some timing control applications it may be desirable to reset the counter under software control.
When the low byte of the counter ($19 or $1B) is written to, the counter is set to its reset value of
$FFFC. The divide-by-4 prescaler is also reset and the counter resumes normal counting
operation. All of the ags and enable bits remain unaltered by this operation. If access has
previously been made to the high byte of the free-running counter ($18 or $1A), then the reset
counter operation terminates the access sequence.
7.2
Output Compare Registers
Output Compare Register
High byte - $16
Low byte - $17
The 16-bit output compare register is made up of two 8-bit registers. This output compare register
is used for several purposes, such as indicating when a period of time has elapsed. All bits are
readable and writable and are not affected by the timer hardware or reset. If the compare function
is not needed, the output compare register can be used as storage locations.
TPG
53
相關PDF資料
PDF描述
MC68HC705JB2DW 8-BIT, OTPROM, 3 MHz, MICROCONTROLLER, PDSO20
MC68HC705JB2P 8-BIT, OTPROM, 3 MHz, MICROCONTROLLER, PDIP20
MC68HC705JB4P 8-BIT, OTPROM, 3 MHz, MICROCONTROLLER, PDIP28
MC68HC705K1CDW 8-BIT, OTPROM, 2 MHz, MICROCONTROLLER, PDSO16
MC68HC705K1CP 8-BIT, OTPROM, 2 MHz, MICROCONTROLLER, PDIP16
相關代理商/技術(shù)參數(shù)
參數(shù)描述
MC68HC05J1 制造商:MOTOROLA 制造商全稱:Motorola, Inc 功能描述:HCMOS MICROCONTROLLER UNIT
MC68HC05J1A 制造商:FREESCALE 制造商全稱:Freescale Semiconductor, Inc 功能描述:Microcontrollers
MC68HC05J1ACDW 制造商:FREESCALE 制造商全稱:Freescale Semiconductor, Inc 功能描述:Microcontrollers
MC68HC05J1ACP 制造商:FREESCALE 制造商全稱:Freescale Semiconductor, Inc 功能描述:Microcontrollers
MC68HC05J1ADW 制造商:FREESCALE 制造商全稱:Freescale Semiconductor, Inc 功能描述:Microcontrollers