Starting from:

$29.99

EEE212 Lab 3- Interrupts Solution


In this lab, you are going to implement a programmable frequency divider as follows:
You will receive a square wave CLKIN s(t) with a frequency fs from (INT1) port. After the initialization, you will configure the divider by typing a number n ∈{2,3,...,9}. Display the divider number n on the LCD screen. Then, generate a signal s0(t) from Port
3.0 that has frequency:

An example of that can be seen below:

Figure 1: Example timing diagram for inputs n = 3,4,5
Output signal s0(t) should track the CLKIN s(t) at all times as frequency and duty cycle of CLKIN can change during operation. Your implementation should only rely on high-to-low transitions.
Hint: Your output do not need to have the same duty cycle as the input.
Notes
In order to prove that you use interrupts, you should place a ‘SJMP $’ at the end of your code that your program counter stays until an interrupt is received.
While submitting your code, please remove the part where the code of “keypad.asm” is used.
1

More products