Thanks for the advice. I got some idea about the circuit. Please help me verify my circuit is correct.
- I have encoder(SE) which send the input to the PIC
- Then PIC will send the output to Motor driver
- Motor driver will send the output to unipolar stepper motor
I have attached my circuit for your reference and also i have write a basic program to test my circuit.I m not sure my Circuit is wrong or my program becos my motor is not moving
Here is my code (Just to rotate the motor no input)
; CPU configuration
; (It's a 16F84, RC oscillator,
; watchdog timer off, power-up timer on)
processor 16f676
include <p16f676.inc>
;__config _RC_OSC & _WDT_OFF & _PWRTE_ON
bsf STATUS, RP0 ;Select Bank1
movlw B'00000000' ;Set Port A as Input
movwf TRISA
movlw B'11111111' ;set Port C as output
movwf TRISC
bcf STATUS, RP0 ;Select Bank0
movlw B'00001100'
movwf PORTC
call delay
movlw B'00000110'
movwf PORTC
call delay
movlw B'00000011'
movwf PORTC
call delay
movlw B'00001001'
movwf PORTC
call delay
delay DECFSZ 255,1
goto delay
return
end