Professional Documents
Culture Documents
Winter 2022
Lab 4
Navpreet Kaur
Student:
10270950
Student ID:
Section: 2
NOTE: Labs are due at the start of the next lab period.
Exercises:
1. Assuming the processor frequency is 20 MHz, find the lowest square wave frequency
that can be generated using Timer0 in 16-bit mode. (Calculations only, no code
needed).
= 65536-0
= 65536
Frequency= 1/t
t = 65536*[12/20*10^6]
= 65536*[3/5*10^6]
t= 0.0393216 sec
=25.431 Hz Ans
2. Assuming the processor frequency is 20 MHz, find the highest square wave frequency
that can be generated using Timer0 in 16-bit mode. (Calculations only, no code
needed).
=65536-65535
=1
t= 1*[12/20*10^6]
= 1*[3/5*10^6]
= 0.0000006 sec
= 1,666,666.666