Docsity

Timers - Microprocessor Interfacing Lab - Quiz, Exercises of Microprocessor and Interfacing

Toggle sidebar
bg1
8
Name: ______________________________ Date: ______________
Matrix No.:___________________________ Group: ______________
5.0 QUESTIONS:
1. What is the maximum frequency that can be generated on Timer0 using a) 16-bit mode,
b) 8-bit mode if the crystal frequency is 16 MHz. Show your calculation.
2. What is the lowest frequency that can be generated on Timer0 using a) 16-bit mode,
b) 8-bit mode if the crystal frequency is 10 MHz? Show your calculation.
3. Compare and differentiate the features of the Timer0, Timer1, and Timer2.
4. In 8-bit mode, when is TMR0IF set to high? State to which register the TMR0IF belongs
to.
5. In 16-bit mode, when is TMR3IF set to high? State to which register the TMR3IF belongs
to.
Docsity.com
pf2

Partial preview of the text

Download Timers - Microprocessor Interfacing Lab - Quiz and more Exercises Microprocessor and Interfacing in PDF only on Docsity!

Name : ______________________________ Date : ______________

Matrix No. :___________________________ Group : ______________

5.0 QUESTIONS:

  1. What is the maximum frequency that can be generated on Timer0 using a) 16-bit mode, b) 8-bit mode if the crystal frequency is 16 MHz. Show your calculation.
  2. What is the lowest frequency that can be generated on Timer0 using a) 16-bit mode, b) 8-bit mode if the crystal frequency is 10 MHz? Show your calculation.
  3. Compare and differentiate the features of the Timer0, Timer1, and Timer2.
  4. In 8-bit mode, when is TMR0IF set to high? State to which register the TMR0IF belongs to.
  5. In 16-bit mode, when is TMR3IF set to high? State to which register the TMR3IF belongs to.

Docsity.com

6.0 PROBLEMS:

  1. Write a program using Timer0 to generate a 500 Hz square wave frequency on PORTB RB0. Then examine the frequency using the MPLAB Logic Analyzer. Modify the count value to make sure that the frequency is exactly 500 Hz.
  2. Write a program using Timer1 to generate a 1 kHz square wave frequency on PORTC RC7. Then examine the frequency using the MPLAB Logic Analyzer. Modify the count value to make sure that the frequency is exactly 1 kHz.
  3. Write a program using Timer0 to generate a 1 kHz and a 2 kHz square wave frequency on PORTB RB0 and PORTB RB4 respectively. PORTB RB7 will be used as a switch to select the frequencies. If RB7 = 0, a 1 kHz square wave will be generated and if RB7 = 1, a 2 kHz square wave will be generated. Then examine the frequencies using the MPLAB Logic Analyzer. Modify the count value to make sure that the frequencies are exact.

Docsity.com