| Electronic Components Datasheet Search |
|
68HC705SB7 Datasheet(PDF) 70 Page - Freescale Semiconductor, Inc |
|
|
|||||||||||||||||||||||||||||
68HC705SB7 Datasheet(HTML) 70 Page - Freescale Semiconductor, Inc |
|
70 / 170 page ![]() 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 specific duration or a pulse train of specific 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 flag 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 flag 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 |
|
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 |