PDA

View Full Version : Possible? to use 'SOUND' to drive a Stepper Motor Driver Board



rayzrocket
- 30th October 2013, 14:01
Typical stepper motor driver boards at robotic sales shops have command inputs of 'dir' and 'step' ; where 'step' needs to be ~10Hz upto ~10khz.

Is it possible to use 'SOUND' for the step command to the driver?
How taxing is 'SOUND' on the PIC? (I'm using PIC161826 @32Mhz intosc), I would like to have two channels of stepper motor control.

Has anyone already done this?
(BTW, don't tell me I'm stupid, I already know that)

Art
- 30th October 2013, 15:28
You're not stupid, but sound is so taxing your pic can't do anything else while it is SOUNDing.
You might be wanting to look at a hardware PWM if you want PWM running full time.
SOUND only does 0 - 0xFF steps (I think).

"Has anyone already done this"
I suspect single bit PWM audio is used to do the floppy drive music videos on YouTube.