Question: Design and develop hardware and software for a PIC18F4321-based system (Figure) that would measure, compute, and display the Root-Mean-Square (RMS) value of a sinusoidal voltage. The system is required to:
1. Sample a 5 V (zero-to-peak voltage), 60 Hz sinusoidal voltage 128 times.
2. Digitize the sampled value using the on-chip ADC of the PIC18F4321 along with its interrupt upon completion of conversion signal.
is the total number of samples. Display the RMS value on seven-segment displays.
(a) Flowchart the problem.
(b) Convert the flowchart to a PIC18F assembly language program.