Question: Problem 1 8 : ( 4 5 points ) A voltage - controlled oscillator ( VCO ) is an electronic oscillator whose frequency is controlled
Problem : points
A voltagecontrolled oscillator VCO is an electronic oscillator whose frequency is controlled by an input voltage. The Ccode in Figure implements a VCO using the dsPICEPMCISP microcontroller.
points Complete lines and to specify the peripheral pin to which the analog control voltage is applied. Justify your answer in one or two short sentences.
points Add comments to lines and
points Specify an equation for PTPER in line ensuring the output frequency linearly changed from kHz to kHz as the control voltage rises from V to V Explain your logic in complete sentences and demonstrate relevant calculations.
points Specify an equation for PDC in line so that the duty cycle of the squarewave output remains approximately regardless of the squarewave frequency. Justify your answer in one or two short sentences.
points Modify the codes to accommodate the ADC module in bit operation mode. Provide the line numbers and corresponding modified codes. Explain your logic in complete sentences and show appropriate calculations.
points Compare the advantages and disadvantages of bit and bit operation modes ADCHSObits. CHOSA; ADCONbits.ADON ;void InitPWMmodulevoidPTCONbitsPTEN ;PTPER ;PDC;IOCONbits.PMOD ;IOCONbits.PENH ;FCLCONbits.FLTMOD ;PTCONbits.PTEN ;int mainvoidInitADC;InitPWMmodule;while delayms;ADCONbits.SAMP ;delayus;ADCONbits.SAMP ;while ADCONbits.DONE;PTPER;PDC;
Figure : C code for Problem
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
