Question: You are developing a program in Pic Basic for a PICAXE - 1 8 M 2 that generates Pulse Width Modulation output to control a
You are developing a program in Pic Basic for a PICAXEM that generates Pulse Width Modulation output to control a motor. The PWM cycle is ms The duty cycle should be variable between ms and ms to
The PWM signal should be produced on PortB pin
The microcontroller is set to use an kHz clock.
Timing precision of pm ms is acceptable.
Create the program in PIC BASIC that sets the correct output at PortB and generates the PWM The duty cycle could be any value that you insert in your code it does not have to be obtained from an external output The timing should be compatible with the clock frequency.
Provide a screenshot showing the code and the correct execution.
Hint: to manage the time you can create a loop that uses nop and goto for a certain amount of iterations. Recall that every instruction takes clock cycles and that goto takes instructions while a nop and other instructions take instruction cycle.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
