this is concept how to control a motor to moving Clock wise, Counter Clock wise and Stop just using single pin from PIC.
Output High: CW
Output Low: CCW
High impedance / configure as input pin: Stop
D1,D2 3.3v zener doide
the program: using hi-tech c compliler