I need help. I need to program the 16f877 PIC to this flow.
Start the stepper motor to rotate clockwise, for some time.
<no operation>
Start the servo motor to rotate clockwise, this is for the mechanical arm to open. for a split second of time
<no operation>
Start the stepper motor to rotate counter clockwise, for the backward movement.
<no operation>
Start the servo motor to rotate counter clockwise, for the releasing of the held object
<no operation>
count +1 and display it to 7 segment LED display.
All processors run machine code, the closest human equivalent of which is assembly. However, PIC's can be programmed in a variety of languages, but assembly is completely free and unrestricted.
I have some source code for driving a servo using a pic 16f, it should work fine on the 877 though it's written in PIC-C, not assembly. You could easily port it to Microchip's C18 compiler, though it's going to be tough if you've never programmed a PIC before. Are you using a development board or did you build the circuit?