thanks eagle seems pretty nice, we have orCAD at the university but I really don't like it...
I'm gonna try this eagle thing
thanks eagle seems pretty nice, we have orCAD at the university but I really don't like it...
I'm gonna try this eagle thing
you're right lol... I'm sorry that you've waisted your time with me, I also figured this out yesterday :s I waisted my time too.
My last problem is to be able to switch frequency only if my pot = 0 (duty cycle = 0) so that the motor won't stall..
Any ideas ?
You mean switch direction when the pot is 0, right?
This won't touch the Direction variable if PotValue is >0.Code:GOSUB GetADC If PotValue = 0 THEN Direction = PortB.7 ' Or whatever ENDIF
Hello,
With your help, my motor works perfectly fine. Thank you very much.
However, a weird thing happens every 1/2 mins, it seems that my chip reset by itself. Does anyone know where does that come from ? I have a 6.7k resistance on MCLR is that not enough ?
Almost impossible to say although noise on the MCLR pin or supply lines are likely causes. There's a register, I believe it's called RCON (check the datasheet), which you can check to see what caused the reset. There will be various bits set depending on if it was a brown-out reset etc - that might help.
Make sure you have sufficient decoupling as close to the supply pins as possible and make sure you coonect ALL the supply pins - not just one pair.
/Henrik.
Add some capacitors to the MCLR. Maybe 0.1 uF and 2.2uF and hopefully you can still program the pic. If you have a long trace on the pcb to the programming connector you can also try to add the capacitors close to the connector since that trace will act like an antenna.
Bookmarks