Variable frequency square wave generator 1hz to 100khz
hello all,
i'm trying feed input pin on m542t stepper driver square wave of variable frequency driven potentiometer. i'd drive i/o pin in background somehow can still have larger number of lines of code running in main loop without causing unwanted delays.
i've tried few approaches far:
1. digital write, delay, digital write, delay - sort of slow. also, described above, more other code have running in loop slower things get.
2. i've used single pin output stepper library (i know isn't how library supposed used) seems have max frequency of 100hz. idea how make go faster?
3. other approaches?
i'm pretty sure possible...just bit beyond experience level. thank help!
happy post code if people want it.
i'm trying feed input pin on m542t stepper driver square wave of variable frequency driven potentiometer. i'd drive i/o pin in background somehow can still have larger number of lines of code running in main loop without causing unwanted delays.
i've tried few approaches far:
1. digital write, delay, digital write, delay - sort of slow. also, described above, more other code have running in loop slower things get.
2. i've used single pin output stepper library (i know isn't how library supposed used) seems have max frequency of 100hz. idea how make go faster?
3. other approaches?
i'm pretty sure possible...just bit beyond experience level. thank help!
happy post code if people want it.
maybe can make use of arduino 'timer', , arduino's interrupt features.
set timer count many milliseconds etc want. , once reaches count, make arduino change output pin voltage 1 state (eg. high) opposite state (low).
the highest count value altered (or controlled) potentiometer.
set timer count many milliseconds etc want. , once reaches count, make arduino change output pin voltage 1 state (eg. high) opposite state (low).
the highest count value altered (or controlled) potentiometer.
Arduino Forum > Using Arduino > Project Guidance > Variable frequency square wave generator 1hz to 100khz
arduino
Comments
Post a Comment