Using third interrupt to read the denominator string receive


This project requires writing a program based on the circuit you built in class for the PIC24HJ32GP202. The first part of the program controls the speed of a motor or the brightness of an LED using PWM, and also performs a division operation, calculating the quotient of a number after the divisor and dividend are entered, and displaying the results to the Bully Bootloader window. The results of the division, floating point format, is to be stored in non-volatile memory. The second part of the program is to be executed after a reset. It will read the floating point dividend calculated earlier from non-volatile memory and display it in the Bully Bootloader window.
Use input pin AN0 to input a DC voltage to the ADC. Convert it to a PWM signal that varies the the speed of a motor.
The variable input voltage should be applied to AN0.
The output to should be fed to RB14 in order to drive motor's speed.
Perform the Analog to Digital Conversion using 10 bit precision.
The motor's speed should increase as the input voltage to the ADC is increased.
Use an Interrupt on input RB13 (CN13) to create a screen prompt asking for a fraction to be input as the division of two 3-digit decimal numbers, e.g., 355/113. 
Verify that this fraction may be entered using "input digits (numerator)" "newline" input digits (denominator)" "newline"
This interrupt may be initiated by the pressing of a button, but the interrupt should be exited as soon as the string requesting data input is sent to the screen.
Use a second interrupt to read the numerator string received from the keyboard. The interrupt should be triggered when the UART receives the "NewLine" character.
Use a third interrupt to read the denominator string received from the interrupt from the keyboard, process the number, and return the results to the screen. Again, let the 
"NewLine" character trigger the interrupt.
Process the input fraction using floating point arithmetic. Display the result with a precision of 5 decimal places.
Output line one of the display: "The floating point value of xxx/yyy is zzz.zzzzz." The output of your floating point calculation should not display leading 0s on the screen unless the result of the division is less than one, for example, 010/001 = 10.00000, not 010.00000, and 001/010 = 0.10000.
Process the input fraction using 2.6 fixed point arithmetic.
Output line two of the display: "The 2.6 fixed point value of xxx/yyy is wwww.wwww." (This illustrates 4.4 data. If you are assigned 2.6 then display ww.wwwwww, etc.)
Store the results in non-volatile memory.
Write a subroutine that reads the floating point data calculated in step from memory and displays it in the Bully Bootloader window with the following text: "The stored value of the division was zzz.zzzzz." You may use any technique you wish to initiate this subroutine, but the person running the routine should receive a prompt at some point instructing how to initiate this subroutine.


Your programs should be developed on and run from a flash drive that will be provided to you.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Using third interrupt to read the denominator string receive
Reference No:- TGS0122787

Expected delivery within 24 Hours