| поискавой системы для электроныых деталей |
|
COP884CF датащи(PDF) 17 Page - National Semiconductor (TI) |
|
|
|
|||||||||||||||||||||||||||||
COP884CF датащи(HTML) 17 Page - National Semiconductor (TI) |
|
17 / 44 page ![]() Timers (Continued) The control bits TxC3, TxC2, and TxC1 allow selection of the different modes of operation. Mode 1. Processor Independent PWM Mode As the name suggests, this mode allows the COP888CF to generate a PWM signal with very minimal user intervention. The user only has to define the parameters of the PWM sig- nal (ON time and OFF time). Once begun, the timer block will continuously generate the PWM signal completely indepen- dent of the microcontroller. The user software services the timer block only when the PWM parameters require updat- ing. In this mode the timer Tx counts down at a fixed rate of t c. Upon every underflow the timer is alternately reloaded with the contents of supporting registers, RxA and RxB. The very first underflow of the timer causes the timer to reload from the register RxA. Subsequent underflows cause the timer to be reloaded from the registers alternately beginning with the register RxB. The Tx Timer control bits, TxC3, TxC2 and TxC1 set up the timer for PWM mode operation. Figure 8 shows a block diagram of the timer in PWM mode. The underflows can be programmed to toggle the TxA output pin. The underflows can also be programmed to generate in- terrupts. Underflows from the timer are alternately latched into two pending flags, TxPNDA and TxPNDB. The user must reset these pending flags under software control. Two control en- able flags, TxENA and TxENB, allow the interrupts from the timer underflow to be enabled or disabled. Setting the timer enable flag TxENA will cause an interrupt when a timer un- derflow causes the RxA register to be reloaded into the timer. Setting the timer enable flag TxENB will cause an interrupt when a timer underflow causes the RxB register to be re- loaded into the timer. Resetting the timer enable flags will disable the associated interrupts. Either or both of the timer underflow interrupts may be en- abled. This gives the user the flexibility of interrupting once per PWM period on either the rising or falling edge of the PWM output. Alternatively, the user may choose to interrupt on both edges of the PWM output. Mode 2. External Event Counter Mode This mode is quite similar to the processor independent PWM mode described above. The main difference is that the timer, Tx, is clocked by the input signal from the TxA pin. The Tx timer control bits, TxC3, TxC2 and TxC1 allow the timer to be clocked either on a positive or negative edge from the TxA pin. Underflows from the timer are latched into the TxP- NDA pending flag. Setting the TxENA control flag will cause an interrupt when the timer underflows. In this mode the input pin TxB can be used as an indepen- dent positive edge sensitive interrupt input if the TxENB con- trol flag is set. The occurrence of a positive edge on the TxB input pin is latched into the TxPNDB flag. Figure 9 shows a block diagram of the timer in External Event Counter mode. Note: The PWM output is not available in this mode since the TxA pin is being used as the counter input clock. Mode 3. Input Capture Mode The device can precisely measure external frequencies or time external events by placing the timer block, Tx, in the in- put capture mode. In this mode, the timer Tx is constantly running at the fixed t c rate. The two registers, RxA and RxB, act as capture regis- DS009425-11 FIGURE 7. Timers DS009425-13 FIGURE 8. Timer in PWM Mode DS009425-14 FIGURE 9. Timer in External Event Counter Mode www.national.com 17 |
|
ссылки URL |
| Вашему бизинису помогли Аллдатащит? [ DONATE ] |
Что такое Аллдатащит | реклама | контакт | Конфиденциальность | Ссылка на техническое описание | обмен ссыками | поиск по производителю 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 |