ECET340

 

Pages 323-325, problems 1-7, 10a, 20, 25, 29, 32

 

1.How many free-running timers do we have in the HCS12?

 

      

 

 

 

2.TCNT of the HCS12 is ____-bit.

 

           

 

 

 

3.For accurate reading, the TCNT is accessed as (8-bit, 16-bit).

 

           

 

 

 

4.The free-running timer supports a highest prescaler value of ______.

 

           

 

 

 

5.The free-running timer supports a lowest prescaler value of ______.

 

          

 

 

 

6.Which register holds the TOF?

 

           

 

7.How do we enable the free-running timer?

 

           

 

 

 

10. Find the frequency and period used by the free-running timer if the crystal attached to the HCS12 has the following values:

 

(a) XTAL = 4 MHz

 

 

 

 

 

 

 

 

 

 

 

20. Assume that XTAL = 4 MHz. Find the value needed to generate a time delay of 5 ms. Use the largest prescaler possible.

 

 

 

 

 

 

 

25. Program channel 2 for Output Compare to generate a square wave of 1 kHz with 50% duty cycle. Assume that XTAL = 4 MHz.

 

 

 

 

 

29. Explain the role of the TIOS register for the Input Capture function.

 

        

 

 

 

32. Explain the role of TCTL3 and TCLT4 in Input Capture function programming.

 

    .

 

 

 

 

 

 

 

    • 11 years ago
    This was graded A+ Use Only As A Guide
    NOT RATED

    Purchase the answer to view it

    blurred-text
    • attachment
      week3hw.docx