On Wed, 27 Jun 2012 19:04:51 -0000, you wrote:
>
>
>--- In Homebrew_PCBs@yahoogroups.com, Randall Morgan <rmorgan62@...> wrote:
>>
>> No, what I am describing is sending the step data not the GCode which has
>> to be interpreted and compiled into step commands. It can be done using a
>> RTOS but under a non RTOS it requires either extra hardware buffering.
>>
>
>
>I rather like the idea of using Gcode since it's so ubiquitous in the world of CNC. Seems like some of the modern microcontrollers ought to have more than enough power to interpret Gcode and drive some stepper motors or servos. It has struck me a number of times that in virtually everything I have ever built with a microcontroller, even the lowest end ones end up spending 90% of their time in delay loops.
Then do an interrupt based system, and check for flags from
interrupting conditions.
The tactical difficulty in a delay loop is that if the external (and
sometimes internal) conditions are not interrupts, you can't respond
quickly.
A trick is to tweak the delay loop calls so that you toggle a pin high
when entering and low when leaving. An oscilloscope can tell you
wonders about where you spend your time.
an FPGA or CPLD can be used to generate steps.
Harvey