| поискавой системы для электроныых деталей |
|
HT45R35 датащи(PDF) 16 Page - Holtek Semiconductor Inc |
|
|
|||||||||||||||||||||||||||||
HT45R35 датащи(HTML) 16 Page - Holtek Semiconductor Inc |
|
16 / 59 page ![]() HT45R35 Rev. 1.30 16 May 14, 2010 Timer/Event Counter An 8-bit timer/event counter, known as Timer/Event Counter, is implemented in the microcontroller. The Timer/Event Counter contains an 8-bit programmable count-up counter whose clock may come from an exter- nal source or from the system clock. Using the external clock input allows the user to count external events, mea- sure time internals or pulse widths, or generate an accu- rate time base. Using the internal clock allows the user to generate an accurate time base. There are 2 registers related to the Timer/Event Coun- ter, TMR and TMRC. Two physical registers are mapped to the TMR location; writing to TMR places the start value of the Timer/Event Counter in a preload register while reading TMR retrieves the contents of the Timer/Event Counter. The TMRC is a timer/event coun- ter control register, which defines the timer operating conditions. The TM0, TM1 bits define the operating mode. The event count mode is used to count external events, which means the clock source comes from an external TMR pin. The timer mode functions as a normal timer with the clock source coming from the fINT clock. The pulse width measurement mode can be used to measure the high or low level duration of an external signal on the TMR pin. The counting is based on the fINT clock source. In the event counting or timer mode, once the timer/event coun- ter starts counting, it will count from the current contents in the Timer/Event Counter to FFH. Once overflow oc- curs, the counter is reloaded from the Timer/Event Coun- ter preload register and an interrupt request flag TF; bit 5 of INTC0, is generated at the same time. In the pulse width measurement mode, with the TON and TE bits equal to one, once the TMR pin has re- ceived a transient from low to high, or high to low if the TE bit is 0, it will start counting until the TMR pin returns to its original level and resets the TON bit. The mea- sured result will remain in the Timer/Event Counter even if the activated transient occurs again. Therefore, only a single shot measurement can be made. The TON bit must be set again by software for further measurements T M 1 T M 0 T M R T E T M 1 T M 0 T O N P u l s e W i d t h M e a s u r e m e n t M o d e C o n t r o l 8 - B i t T i m e r / E v e n t C o u n t e r P r e l o a d R e g i s t e r 8 - B i t T i m e r / E v e n t C o u n t e r ( T M R ) D a t a B u s R e l o a d O v e r f l o w t o I n t e r r u p t 7 - S t a g e P r e s c a l e r 8 - 1 M U X f I N T T P S C 2 ~ T P S C 0 S y s t e m C l o c k Timer/Event Counter Bit No. Label Function 0~2 TPSC0~TPSC2 To define the prescaler stages, TPSC2, TPSC1, TPSC0= 000: fINT=fSYS 001: fINT=fSYS/2 010: fINT=fSYS/4 011: fINT=fSYS/8 100: fINT=fSYS/16 101: fINT=fSYS/32 110: fINT=fSYS/64 111: fINT=fSYS/128 3TE To define the TMR active edge of the timer/event counter (0=active on low to high; 1=active on high to low) 4 TON To enable or disable timer counting (0=disabled; 1=enabled) 5 ¾ Unused bit, read as ²0² 6 7 TM0 TM1 To define the operating mode, TM1, TM0= 01=Event count mode (external clock) 10=Timer mode (internal clock) 11=Pulse width measurement mode 00=Unused TMRC (0EH) Register |
|
ссылки 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 |