Knowee
Questions
Features
Study Tools

You need to generate a 3906.25 Hz PWM waveform on RC2 using a 1:1 prescaled TMR1 ISR shown below. The duty cycle is set using a global uint8_t variable called dutyCycle.What is the value of scale?void myTMR1ISR(void) { if (PORTCbits.RC2 == 1) { LATCbits.LATC2 = 0; TMR1_WriteTimer(0x10000 - (MAX - scale*dutyCycle)); } else { LATCbits.LATC2 = 1; TMR1_WriteTimer(0x10000 - scale*dutyCycle); } PIR1bits.TMR1IF = 0;}  Answer not given   4 Correct!  16   64   100

Question

You need to generate a 3906.25 Hz PWM waveform on RC2 using a 1:1 prescaled TMR1 ISR shown below. The duty cycle is set using a global uint8_t variable called dutyCycle.What is the value of scale?void myTMR1ISR(void) { if (PORTCbits.RC2 == 1) { LATCbits.LATC2 = 0; TMR1_WriteTimer(0x10000 - (MAX - scaledutyCycle)); } else { LATCbits.LATC2 = 1; TMR1_WriteTimer(0x10000 - scaledutyCycle); } PIR1bits.TMR1IF = 0;}  Answer not given   4 Correct!  16   64   100

...expand
🧐 Not the exact question you are looking for?Go ask a question

Solution

I'm sorry, but you didn't provide a text for me to respond to. Could you please provide the text?

Similar Questions

You have configured the PIC as follows:RC2 is configured as an outputTMR1 to run with a 1:1 prescaler and calls myTMR1ISR whenever TMR1 rolls over.What is the frequency and duty cycle of the waveform formed on RC2?void myTMR1ISR(void) { if (PORTCbits.RC2 == 1) { LATCbits.LATC2 = 0; TMR1_WriteTimer(0x10000 - 8000); } else { LATCbits.LATC2 = 1; TMR1_WriteTimer(0x10000 - 24000); } PIR1bits.TMR1IF = 0;}Group of answer choices500 Hz at 75% duty cycle2000 Hz at 66% duty cycleNone of the above500 Hz at 25% duty cycle2000 Hz at 33% duty cycle

An embedded C program is used to generate the square waveform using timer 0 in mode 2. The TH0 is loaded with 48h. What is the frequency of the square waveform.1500250010002000

An embedded C program is used to generate the square waveform using timer 0 in mode 2. The TH0 is loaded with 48h. What is the frequency of the square waveform.

The following function is related to PWM mode for PIC:Select one:a. Variations in the status of an output pinb. Detection of an exact point at which the change occurs in an input edgec. To generate rectangular waveform with programmable duty cycle with an user assigned frequencyd. Generation of an interrupt

The following function is related to PWM mode for PIC:Select one:a. Detection of an exact point at which the change occurs in an input edgeb. Variations in the status of an output pinc. To generate rectangular waveform with programmable duty cycle with an user assigned frequencyd. Generation of an interrupt

1/1

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.