ELECTRICAL ENGINEERINGSchool of EngineeringEGRE 427 Advanced Digital DesignLaboratory/Homework No. 1Programming the PIC 17C44 Microcontroller for aControll Applications Using Basic Digital I/O2I. Getting StartedThis homework must be pledged as your own (individual) work – write it out and sign it.Log onto the PC in the Digital Systems Prototyping Lab that controls the PICMicrocontroller emulator. Follow the first tutorial on the PIC tutorial page:http://www.people.vcu.edu/~rhklenke/tutorials/pic/index.htmlto compile and run the simple test program for the robotic arm.II. AssignmentThe system board for the robot arm has 6 switches mounted in it. These switches areconnected to the PORTD inputs of the 17C44 as described in the table below. Theswitches are wired such that the normal voltage the PORTD inputs when the switches arenot pressed is 0V and the voltage on the inputs when the switches are pressed is 5V.SwitchLabelPORTD input Function"D" D0 Moves the robot arm down in elevation"U" D1 Moves the robot arm up in elevation"L" D2 Moves the robot arm to the left in rotation"R" D3 Moves the robot arm to the right in rotation"O" D4 Moves the robot arm grip further open"C" D5 Moves the robot arm grip further closedWrite a new program for the arm that reads the value on the switches and moves therobot arm in the commanded direction. The robot arm should start in a "rest" position thatyou specifically define in your program. You can assume (or require) that only oneswitch is closed at a time. When a switch is pressed, the robot should move anincremental amount in the commanded direction, not all at once. If the switch iscontinuously depressed, the arm should move in a steady manner in the commandeddirection until the limits of travel (as defined in the original arm.c program) are reached.At no point in time should the arm move past those defined limits. The servo pulsesshould be generated every 10ms, ±1ms, regardless of the motion of the servo arm.For this assignment, you must turn in a cover sheet with your name, date, and a briefparagraph stating how you tested your program and if it worked, and a complete listing ofall of your code (all *.h and *.c files). You must also demonstrate the operation of yourprogram to the
View Full Document