Question: Write a program that generates one cycle of a square wave with frequency of 100mHz on port pin P3.3 with duty cycle depending on the
Write a program that generates one cycle of a square wave with frequency of 100mHz on port pin P3.3 with duty cycle depending on the 4-bit input value mentioned on port P2 by the user. User prepares a 4-bit data over the binary switches, and then sets the control switch to logic 0 and then back to logic 1 (1-0-1). The user is allowed to mention the value from 0 10. For example, if input value is 1 then duty cycle is 10%, if the value is 2 duty cycle is 20% and so on. If value is 0 then P3.3 is low and if value is greater than or equal to 10 then P3.3 is high.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
