aLec12_timer_debugging - Introduction to Embedded...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Introduction to Embedded Microcomputer Systems Lecture 12.1 Jonathan W. Valvano Recap Pointers Indexed mode Arrays and strings Overview Timer Fixed-time delay Debugging Intrusiveness Monitors and dumps 4.5. 16-bit timer $0044 b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0 TCNT Addr Bit 7 6 5 4 3 2 1 Bit 0 Name $0044 Bit 15 14 13 12 11 10 9 Bit 8 TCNT $0045 Bit 7 6 5 4 3 2 1 Bit 0 TCNT $0046 TEN TSWAI TSFRZ TFFCA 0 0 0 0 TSCR1 $004D TOI 0 0 0 TCRE PR2 PR1 PR0 TSCR2 $004F TOF 0 0 0 0 0 0 0 TFLG2 Table 4.11. 9S12 timer ports. E = 8 MHz E = 24 MHz PR2 PR1 PR0 Divide by TCNT period TCNT frequency TCNT period TCNT frequency 0 0 0 1 125 ns 8 MHz 41.7 ns 24 MHz 0 0 1 2 250 ns 4 MHz 83.3 ns 12 MHz 0 1 0 4 500 ns 2 MHz 167 ns 6 MHz 0 1 1 8 1 μs 1 MHz 333 ns 3 MHz 1 0 0 16 2 μs 500 kHz 667 ns 1.5 MHz 1 0 1 32 4 μs 250 kHz 1.33 μs 667 kHz 1 1 0 64 8 μs 125 kHz 2.67 μs 333 kHz 1 1 1 128 16 μs 62.5 kHz 5.33 μs 167 kHz Table 4.12. Given an E clock frequency, the PR2 PR1 and PR0 bits define the TCNT rate. Fixed time delay software using the built-in timer
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Introduction to Embedded Microcomputer Systems Lecture 12.2 Jonathan W. Valvano soFar >= delay Wait(delay) startTime = TCNT soFar = TCNT - startTime soFar < delay
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/19/2010 for the course E E 16280 taught by Professor Valvano during the Fall '10 term at University of Texas at Austin.

Page1 / 5

aLec12_timer_debugging - Introduction to Embedded...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online