Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are developing a program in Assembly for a PIC 1 6 F 8 4 A that generates Pulse Width Modulation output to control a

You are developing a program in Assembly for a PIC16F84A that generates Pulse Width Modulation output to control a motor. The PWM cycle is 20ms. The duty cycle should be variable between 1ms and 19ms (5% to 95%).
The PWM signal should be produced on PortB pin 1.
The microcontroller is set to use an 800 kHz clock.
Timing precision of \pm 0.2ms is acceptable.
- Create the program in Assembly using MPLAB 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.
- Provide a screenshot showing the stopwatch running when the output turns ON and then when it turns OFF (this should prove that the time between the pulses is 20ms)
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 4 clock cycles and that goto takes 2 instructions while a nop and other instructions take 1 instruction cycle.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

( a ) State the ways to display the output in JavaScript.

Answered: 1 week ago