Docsity

RPG Sensitivity Reduction Project for ECE 4175, Study Guides, Projects, Research of Electrical and Electronics Engineering

Toggle sidebar
bg1
Project Nine RPG Sensitivity Reduction Page 1 of 1
ECE 4175
Project Nine
RPG Sensitivity Reduction
Complete by:
Wednesday March 11 for an A+
For this project, modify your P7file (that wrote PRESSED/RELEASED, etc.) into a new P9.c
file. Rename the Display function as DisplayV, accessing variable display strings stored in
RAM. Then after initializing the LCD, use the DisplayC function from P8 to write your handle
to the center of the top line of the display using a constant display string stored in program
memory. Also use DisplayC to display on the bottom line, beginning at the leftmost character
position:
RPGPOS = 00 (60 inc/rev)
The RPG position is to be updated from the initial 00 each time the RPG is incremented or
decremented, as a number between 00 and 59. This will give 60 increments or decrements per
revolution. Update the display only on the loop times when DELRPG != 0.
After the pushbutton is pressed once, use DisplayC to rewrite the two characters, 60, to 30 on the
bottom line display. Also, halve the sensitivity of the RPG, so that the RPG function produces
DELRPG values of +1 or -1 only for each change from 01û00 or 10û11 in one direction and
only for each change from 00û01 or 11û10 in the other direction. Do this so as to produce 30
increments/decrements per revolution. Again, update the display of RPGPOS only on the loop
times when DELRPG != 0.
After the pushbutton is pressed one further time, use DisplayC to rewrite the two characters, 30,
to 15 on the bottom line display. Also halve the sensitivity of the RPG, producing DELRPG
values of +1 or -1 only for each change from 01û00 in one direction and for 00û01 in the other
direction. Do this so as to produce 15 increments/decrements per revolution. Again, update the
display of RPGPOS only on the loop times when DELRPG != 0.
A further press of the pushbutton is to rewrite the two characters, 15, to 60 on the bottom line of
the display. Once again, produce 60 increments/decrements per revolution.
Set RD0 at the beginning of the main loop. Clear RD0 just before calling LoopTime. Then use
the pulse width of RD0 to monitor the minimum and maximum times of doing useful work.
Get a little 1/4" diameter label from the TA to put on the top of your RPG. Put a dot or small
radial line on it, to mark the angular position of the RPG (so that you can monitor one revolution
of the RPG).

Partial preview of the text

Download RPG Sensitivity Reduction Project for ECE 4175 and more Study Guides, Projects, Research Electrical and Electronics Engineering in PDF only on Docsity!

Project Nine RPG Sensitivity Reduction Page 1 of 1

ECE 4175

Project Nine

RPG Sensitivity Reduction

Complete by: Wednesday March 11 for an A+

For this project, modify your P7file (that wrote PRESSED/RELEASED, etc.) into a new P9.c file. Rename the Display function as DisplayV, accessing variable display strings stored in RAM. Then after initializing the LCD, use the DisplayC function from P8 to write your handle to the center of the top line of the display using a constant display string stored in program memory. Also use DisplayC to display on the bottom line, beginning at the leftmost character position: RPGPOS = 00 (60 inc/rev)

The RPG position is to be updated from the initial 00 each time the RPG is incremented or decremented, as a number between 00 and 59. This will give 60 increments or decrements per revolution. Update the display only on the loop times when DELRPG != 0.

After the pushbutton is pressed once, use DisplayC to rewrite the two characters, 60, to 30 on the bottom line display. Also, halve the sensitivity of the RPG, so that the RPG function produces DELRPG values of +1 or -1 only for each change from 01˚00 or 10˚11 in one direction and only for each change from 00˚01 or 11˚10 in the other direction. Do this so as to produce 30 increments/decrements per revolution. Again, update the display of RPGPOS only on the loop times when DELRPG != 0.

After the pushbutton is pressed one further time, use DisplayC to rewrite the two characters, 30, to 15 on the bottom line display. Also halve the sensitivity of the RPG, producing DELRPG values of +1 or -1 only for each change from 01˚00 in one direction and for 00˚01 in the other direction. Do this so as to produce 15 increments/decrements per revolution. Again, update the display of RPGPOS only on the loop times when DELRPG != 0.

A further press of the pushbutton is to rewrite the two characters, 15, to 60 on the bottom line of the display. Once again, produce 60 increments/decrements per revolution.

Set RD0 at the beginning of the main loop. Clear RD0 just before calling LoopTime. Then use the pulse width of RD0 to monitor the minimum and maximum times of doing useful work.

Get a little 1/4" diameter label from the TA to put on the top of your RPG. Put a dot or small radial line on it, to mark the angular position of the RPG (so that you can monitor one revolution of the RPG).