COSC 422

Programming Assignment #1



You will work in the same teams you already have. Grades will be shared by both members of the team.


You must hand in a well documented source code listing.


LetŐs REALLY flash and LED



We want to see an LED flash on and off. Specifically, we wish to alternate between the LED being on for 275 milliseconds and off for  180 milliseconds. You should write 2 PIC subroutines:

one is called delay275  and the other called delay180 that delay 275 and 180 milliseconds respectively. Remember it takes 2 microseconds to invoke these subroutines and 2 milliseconds to return.


You should attempt to write this program without the use of the oscilloscope, although I may use one for grading.


You should wire up one pin on your chip to a resistor in the 400-2000 ohm range and then wire the resistor to an LED. Make sure to ground the LED and observe polarity. I will demonstrate this in class.