参数资料
型号: MC68HC05SB7
厂商: FREESCALE SEMICONDUCTOR INC
元件分类: 微控制器/微处理器
英文描述: 8-BIT, MROM, 2.1 MHz, MICROCONTROLLER, PDSO28
封装: MO-150, SSOP-28
文件页数: 139/170页
文件大小: 2161K
代理商: MC68HC05SB7
GENERAL RELEASE SPECIFICATION
August 27, 1998
MOTOROLA
16-BIT TIMER
MC68HC05SB7
10-8
REV 2.1
Software can use the output compare register to measure time periods, to gener-
ate timing delays, or to generate a pulse of specic duration or a pulse train of
specic frequency and duty cycle on the TCMP.
The planned action on the TCMP depends on the value stored in the OLVL bit in
the TCR, and it occurs when the value of the 16-bit free-running timer counter
matches the value in the output compare registers shown in Figure 10-3. These
registers are read/write bits and are unaffected by reset.
Writing to the OCRH before writing to the OCRL inhibits timer compares until the
OCRL is written. Reading or writing to the OCRL after reading the TSR will clear
the output compare ag bit (OCF). The output compare OLVL state will be clocked
to its output latch regardless of the state of the OCF.
To prevent OCF from being set between the time it is read and the time the output
compare registers are updated, use the following procedure:
1.
Disable interrupts by setting the I bit in the condition code register.
2.
Write to the OCRH. Compares are now inhibited until OCRL is written.
3.
Read the TSR to arm the OCF for clearing.
4.
Enable the output compare registers by writing to the OCRL. This also
clears the OCF ag bit in the TSR.
5.
Enable interrupts by clearing the I bit in the condition code register.
A software example of this procedure is shown below.
BIT 7
BIT 6
BIT 5
BIT 4
BIT 3
BIT 2
BIT 1
BIT 0
OCRH
R
OCRH7
OCRH6
OCRH5
OCRH4
OCRH3
OCRH2
OCRH1
OCRH0
$0016
W
reset:
UUUUUUUU
OCRL
R
OCRL7
OCRL6
OCRL5
OCRL4
OCRL3
OCRL2
OCRL1
OCRL0
$0017
W
reset:
UUUUUUUU
U = UNAFFECTED BY RESET
Figure 10-11. Output Compare Registers (OCRH, OCRL)
9B
...
B7
B6
BF
...
9A
16
13
17
SEI
...
STA
LDA
STX
...
CLI
OCRH
TSR
OCRL
DISABLE INTERRUPTS
.....
INHIBIT OUTPUT COMPARE
ARM OCF FLAG FOR CLEARING
READY FOR NEXT COMPARE, OCF CLEARED
.....
ENABLE INTERRUPTS
相关PDF资料
PDF描述
MC68HC705SB7 8-BIT, OTPROM, 2.1 MHz, MICROCONTROLLER, PDSO28
MC68HC05SU3AB 8-BIT, MROM, 2 MHz, MICROCONTROLLER, PDIP42
MC68HC05T2P 8-BIT, MROM, MICROCONTROLLER, PDIP40
MC68HC08AS32CFN 8-BIT, EEPROM, 8.4 MHz, MICROCONTROLLER, PQCC52
MC68HC08AS32VFN 8-BIT, EEPROM, 8.4 MHz, MICROCONTROLLER, PQCC52
相关代理商/技术参数
参数描述
MC68HC05SC24 制造商:MOTOROLA 制造商全称:Motorola, Inc 功能描述:Secure 8-bit microcomputer with EEPROM
MC68HC05SR3 制造商:FREESCALE 制造商全称:Freescale Semiconductor, Inc 功能描述:High-density Complementary Metal Oxide Semiconductor (HCMOS) Microcontroller Units
MC68HC05SU3A 制造商:FREESCALE 制造商全称:Freescale Semiconductor, Inc 功能描述:Fully static chip design featuring the industry standard 8-bit M68HC05 core
MC68HC05T16 制造商:FREESCALE 制造商全称:Freescale Semiconductor, Inc 功能描述:High-density complementary metal oxide semiconductor (HCMOS) microcontroller unit
MC68HC05V12 制造商:FREESCALE 制造商全称:Freescale Semiconductor, Inc 功能描述:HCMOS Microcontreller Unit