Today we have managed to create an interface between PC and Pic! Using a program known has Hyperterminal, we have a program that can, with the push of a button from the keyboard, have the pic read it, and output back to the user that a button was pushed. With this code, we have modified it so that it will, by pressing the L or R keys, change the direction of a stepper motor either clockwise or counter-clockwise. Theoretically the code will work as programmed, but because the lab closed, we were unable to test it with the in-lab waveform generator. That will have to wait until tomorrow.
We are deciding upon whether to use a dummy loop to act as our delay function, or an Pic interrupt. The delay function, though easier to implement, has the potential to lose a few instructions in the delay time between the pic and the pc. The Pic interrupt can circumvent this, but must be implemented carefully. For now, we will use a dummy delay loop (just a for loop that does nothing) to act as our delay for the purposes of development, and have plans to replace this with something more efficient.
Wednesday, February 18, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment