參數(shù)資料
型號(hào): ACE1101
廠商: Fairchild Semiconductor Corporation
英文描述: Arithmetic Controller Engine For Low Power Applications(低功耗器件運(yùn)用的算術(shù)控制引擎)
中文描述: 算術(shù)控制發(fā)動(dòng)機(jī)用于低功率應(yīng)用(低功耗器件運(yùn)用的算術(shù)控制引擎)
文件頁數(shù): 21/35頁
文件大?。?/td> 2330K
代理商: ACE1101
21
www.fairchildsemi.com
ACE1101 Product Family Rev. A.3
A
5.3 Mode 2: External Event Counter Mode
The External Event Counter mode operates similarly to the PWM
mode; however, the timer is not clocked by the instruction clock
but by transitions of the T1 input signal. The edge is selectable
through the T1C1 bit of the T1CNTRL register. A block diagram of
the timer
s External Event Counter mode of operation is shown in
Figure 16.
The T1 input should be connected to an external device that
generates a positive/negative-going pulse for each event. By
clocking the timer through T1, the number of positive/negative
transitions can be counted therefore allowing software to capture
the number of events that occur. The input signal on T1 must have
a pulse width equal to or greater than one instruction clock cycle.
The counter can be configured to sense either positive-going or
negative-going transitions on the T1 pin. The maximum frequency
at which transitions can be sensed is one-half the frequency of the
instruction clock.
As with the PWM mode, when the counter underflows the counter
is reloaded from the T1RA register and the count down
proceedsfrom the loaded value. At every underflow, a pending
flag (T1PND) located in the T1CNTRL register is set. Software
must then clear the T1PND flag and can then load the T1RA
register with an alternate value.
The counter has one interrupt (TMR1) that is maskable through
the T1EN bit of the T1CNTRL register. However, the core is only
interrupted if the T1EN bit and the G (Global Interrupt enable) bit
of the SR is set. If interrupts are enabled, the counter will generate
an interrupt each time the T1PND flag is set (whenever timer
underflows provided that the pending flag was cleared.) The
interrupt service routine is responsible for proper handling of the
T1PND flag and the T1EN bit.
The following steps show how to properly configure Timer 1 to
operate in the External Event Counter mode. For this example, the
counter is clocked every falling edge of the T1 input signal. Follow
Timer
Underflow
Interrupts
Edge Selector
Logic
T1
BUS
16-bit Autoreload
Register T1RA
16-bit Counter
Figure 16: External Event Counter Mode Block Diagram
the instructions in parentheses to clock the counter every rising
edge.
1. Configure T1 as an input by clearing bit 2 of PORTGC.
- RBIT 2, PORTGC
2. Initialize T1 to input with pull-up by setting bit 2 of PORTGD.
- SBIT 2, PORTGD
3. Enable the global interrupt enable bit.
- SBIT 4, STATUS
4. Load the initial count into the TMR1 and T1RA registers.
When the number of external events is detected, the counter
will reach zero; however, it will not underflow until the next
event is detected. To count N pulses, load the value N-1 into
the registers. If it is only necessary to count the number of
occurrences and no action needs to be taken at a particular
count, load the value 0xFFFF into the registers.
- LD TMR1LO, #0FFH
- LD TMR1HI, #00H
- LD T1RALO, #0FFH
- LD T1RAHI, #00H
5. Write the appropriate control value to the T1CNTRL register
to select External Event Counter mode, to clock every falling
edge, to set the enable bit, to clear the pending flag, and to
start the counter. (See Table 12 and Table 13)
- LD T1CNTRL, #34H (#00h) ; Setting the T1C0 bit
; Configure G2 as an input
; Set G2 high
starts the timer
6. When the counter underflows, the interrupt service routine
must clear the T1PND flag and take whatever action is
required once the number of events occurs. If the software
wishes to merely count the number of events and the
anticipated number may exceed 65,536, the interrupt service
routine should record the number of underflows by
incrementing a counter in memory. Software can then
calculate the correct event count.
- RBIT T1PND, T1CNTRL
; T1PND equals 3
相關(guān)PDF資料
PDF描述
ACE1202E Arithmetic Controller Engine (ACEx⑩) for Low Power Applications
ACE12022EM8X Arithmetic Controller Engine (ACEx⑩) for Low Power Applications
ACE12022BEM8X Arithmetic Controller Engine (ACEx⑩) for Low Power Applications
ACE1202EM8X Arithmetic Controller Engine (ACEx⑩) for Low Power Applications
ACE12022BN14 Arithmetic Controller Engine (ACEx⑩) for Low Power Applications
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
ACE1101B 制造商:FAIRCHILD 制造商全稱:Fairchild Semiconductor 功能描述:Arithmetic Controller Engine (ACEx⑩) for Low Power Applications
ACE1101BE 制造商:FAIRCHILD 制造商全稱:Fairchild Semiconductor 功能描述:Arithmetic Controller Engine (ACEx⑩) for Low Power Applications
ACE1101BEM8 功能描述:8位微控制器 -MCU arithmetic Controllr Engine RoHS:否 制造商:Silicon Labs 核心:8051 處理器系列:C8051F39x 數(shù)據(jù)總線寬度:8 bit 最大時(shí)鐘頻率:50 MHz 程序存儲(chǔ)器大小:16 KB 數(shù)據(jù) RAM 大小:1 KB 片上 ADC:Yes 工作電源電壓:1.8 V to 3.6 V 工作溫度范圍:- 40 C to + 105 C 封裝 / 箱體:QFN-20 安裝風(fēng)格:SMD/SMT
ACE1101BEMT8 功能描述:8位微控制器 -MCU arithmetic Controllr Engine RoHS:否 制造商:Silicon Labs 核心:8051 處理器系列:C8051F39x 數(shù)據(jù)總線寬度:8 bit 最大時(shí)鐘頻率:50 MHz 程序存儲(chǔ)器大小:16 KB 數(shù)據(jù) RAM 大小:1 KB 片上 ADC:Yes 工作電源電壓:1.8 V to 3.6 V 工作溫度范圍:- 40 C to + 105 C 封裝 / 箱體:QFN-20 安裝風(fēng)格:SMD/SMT
ACE1101BEMT8X 功能描述:8位微控制器 -MCU TSSOP-8 2.7-5.5V T/R RoHS:否 制造商:Silicon Labs 核心:8051 處理器系列:C8051F39x 數(shù)據(jù)總線寬度:8 bit 最大時(shí)鐘頻率:50 MHz 程序存儲(chǔ)器大小:16 KB 數(shù)據(jù) RAM 大小:1 KB 片上 ADC:Yes 工作電源電壓:1.8 V to 3.6 V 工作溫度范圍:- 40 C to + 105 C 封裝 / 箱體:QFN-20 安裝風(fēng)格:SMD/SMT