If it still does not work after you clean up your code. You may just have one of your coils reversed on your stepper motor. This will cause the motor hum and not rotate. A schematic of your project would help.
good luck
If it still does not work after you clean up your code. You may just have one of your coils reversed on your stepper motor. This will cause the motor hum and not rotate. A schematic of your project would help.
good luck
what's wrong when i on my circuit..the led i used as indicator for the sequence will only standby on the first step..and when i touch the positive side of the supply it start to run..i construct my circuit in the breadboard as of now for trial...
Did you pulled up with a 10K the MCLR (reset pin) of your microcontroller?..and when i touch the positive side of the supply it start to run
Why don't you post your circuit?
Al.
All progress began with an idea
i didnt use the MCLR in my mcu...
what is the right thing to do?
Last edited by thenew; - 7th March 2011 at 11:03.
You might be able to turn MCLR off but we do not know the chip you are using.
Post your configs, complete code, and schematic so the folks here will be able to help you.
Dave
Always wear safety glasses while programming.
the schematic above is the one i used to...
i am using pic16f84 and uln2803...
here is the code:
define osc 4
ti var byte
c var byte
z var byte
ti=40
trisb=0
open:
for z=0 to 25
portb=128
pause ti
portb=64
pause ti
portb=32
pause ti
portb=16
pause ti
next z
goto delay
open1:
for z=0 to 25
portb=128
pause ti
portb=64
pause ti
portb=32
pause ti
portb=16
pause ti
next z
goto delay3
close:
for z=0 to 25
portb=16
pause ti
portb=32
pause ti
portb=64
pause ti
portb=128
pause ti
next z
goto delay1
close1:
for z=0 to 25
portb=16
pause ti
portb=32
pause ti
portb=64
pause ti
portb=128
pause ti
next z
goto delay4
delay:
portb=0
pause 2000
goto close
delay1:
portb=0
pause 2000
goto loop
delay2:
portb=0
pause 2000
goto open1
delay3:
portb=0
pause 2000
goto close1
delay4:
portb=0
pause 2000
goto loop1
delay5:
portb=0
pause 2000
goto open
loop:
for c=0 to 275
portb=12
pause ti
portb=6
pause ti
portb=3
pause ti
portb=9
pause ti
next c
pause 2000
goto delay2
loop1:
for c=0 to 275
portb=9
pause ti
portb=3
pause ti
portb=6
pause ti
portb=12
pause ti
next c
goto delay5
end
Last edited by thenew; - 7th March 2011 at 15:15.
From the schematic you have posted, you have left the MCLR pin floating, and this is the reason of the problem you reported. Connect the MCLR pin to Vdd (+5V) using a 10K resistor. If you need to reset your chip then short the MCLR pin momentarely to ground for a second and than remove the short.
Did you connect ULN2803 to ground ?
Al.
Last edited by aratti; - 7th March 2011 at 16:35.
All progress began with an idea
Bookmarks