Hi there
what is the fastest square wave i can get out of a 18x and what command do i use to get it?
at the mo im just high 1,pause 1, low 1, pause Etc
Im sure theres a better way?Faster etc
Id like my stepper motor to go faster.
Cheers
Running at 8MHz ( SETFREQ M8 ) you can get a 1MHz square wave using PWMOUT.
However, that's just a single signal. For a stepper motor you need more than one signal ( each different ) and they need to be synchronised to each other so PWMOUT probably dosn't help.
If using HIGH, LOW and PAUSE the simple solution seems to be to reduce any PAUSE values and / or run the 18X at a faster speed.
Thanks Hippy
ill try that.
Ive got a stepper driver that only needs a high to low signal change to make one step it does the rest of the seqwencing?spelling
ill see how fast it lets me step?
Cheers
If the stepper drive is single line control, PWMOUT will probably do the job. The Programming Editor PWMOUT Wizard will give the required values for whatever frequency you need.
Why not try a code loop from slow to fast PWM and see where it goes yukky?
Everyone seems tempted to go for overfast PWM for controlling motor speeds.
As you haven't identifed the stepper then no-one knows what it is and therefore can't provide their benefit of experience. If it's an unknown then experimentation by you is the quickest/easiest way i would have thought (?).
Some idea of what frequency you are looking to achieve will help, then an answer can be tailored to that. It's possible with some twiddling of internal SFR's to make PWM run slower than its nominal 3kHz minimum.