| Electronic Components Datasheet Search |
|
COP685BC Datasheet(PDF) 16 Page - National Semiconductor (TI) |
|
|
|
|||||||||||||||||||||||||||||
COP685BC Datasheet(HTML) 16 Page - National Semiconductor (TI) |
|
16 / 57 page ![]() Timers (Continued) TIMER CONTROL FLAGS The control bits and their functions are summarized below. T1C3 Timer mode control T1C2 Timer mode control T1C1 Timer mode control T1C0 Timer Start/Stop control in Modes 1 and 2 (Pro- cessor Independent PWM and External Event Counter), where 1 = Start, 0 = Stop Timer Underflow Interrupt Pending Flag in Mode 3 (Input Capture) T1PNDA Timer Interrupt Pending Flag T1ENA Timer Interrupt Enable Flag 1 = Timer Interrupt Enabled 0 = Timer Interrupt Disabled T1PNDB Timer Interrupt Pending Flag T1ENB Timer Interrupt Enable Flag 1 = Timer Interrupt Enabled 0 = Timer Interrupt Disabled The timer mode control bits (T1C3, T1C2 and T1C1) are detailed below: Mode T1C3 T1C2 T1C1 Description Interrupt A Source Interrupt B Source Timer Counts On 1 1 0 1 PWM: T1A Toggle Autoreload RA Autoreload RB t C 1 0 0 PWM: No T1A Toggle Autoreload RA Autoreload RB t C 2 0 0 0 External Event Counter Timer Underflow Pos. T1B Edge Pos. T1A Edge 0 0 1 External Event Counter Timer Underflow Pos. T1B Edge Pos. T1A Edge 3 0 1 0 Captures: Pos. T1A Edge Pos. T1B Edge t C T1A Pos. Edge or Timer T1B Pos. Edge Underflow 1 1 0 Captures: Pos. T1A Neg. T1B t C T1A Pos. Edge Edge or Timer Edge T1B Neg. Edge Underflow 0 1 1 Captures: Neg. T1A Neg. T1B t C T1A Neg. Edge Edge or Timer Edge T1B Neg. Edge Underflow 1 1 1 Captures: Neg. T1A Neg. T1B t C T1A Neg. Edge Edge or Timer Edge T1B Neg. Edge Underflow HIGH SPEED, CONSTANT RESOLUTION PWM TIMER The device has one processor independent PWM timer. The PWM timer operates in two modes: PWM mode and capture mode. In PWM mode the timer outputs can be programmed to two pins PWM0 and PWM1. In capture mode, pin PWM0 functions as the capture input. Figure 12 shows a block dia- gram for this timer in capture mode and Figure 13 shows a block diagram for the timer in PWM mode. PWM Timer Registers The PWM Timer has three registers: PWMCON, the PWM control register, RLON, the PWM on-time register and PSCAL, the prescaler register. PWM Prescaler Register (PSCAL) (Address X’00A0) The prescaler is the clock source for the counter in both PWM mode and in frequency monitor mode. PSCAL is a read/write register that can be used to program the prescaler. The clock source to the timer in both PWM and capture modes can be programmed to CKI/N where N = PSCAL + 1, so the maximum PWM clock frequency = CKI and the minimum PWM clock frequency = CKI/256. The pro- cessor is able to modify the PSCAL register regardless of whether the counter is running or not and the change in fre- quency occurs with the next underflow of the prescaler (CK- PWM). PWM On-time Register (RLON) (Address X’00A1) RLON is a read/write register. In PWM mode the timer output will be a “1” for RLON counts out of a total cycle of 255 PWM clocks. In capture mode it is used to program the threshold frequency. The PWM timer is specially designed to have a resolution of 255 PWM clocks. This allows the duty cycle of the PWM out- put to be selected between 1/255 and 254/255. A value of 0 in the RLON register will result in the PWM output being con- tinuously low and a value of 255 will result in the PWM output being continuously high. Note: The effect of changing the RLON register during active PWM mode op- eration is delayed until the boundary of a PWM cycle. In capture mode the effect takes place immediately. www.national.com 16 |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List 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 |