Controlling CNC machine
Hi!
I'am new to STM's so I thought I will learn them by making the project. I want to control a CNC machine. I started to control stepper motor via TB6600. The problem I cannot solve is setting very accurate frequency for the PWM. For example:
I have 16 microstepping and a ball screw (1 turn is 5mm move). That gives me the resolution about 1/640mm per step(640 pulses per mm). Without microstep it's 1/40mm per step.
With 1/16 microstepping I need to give 3200 steps to make 1 turn (5mm move). So.
When I want to set feed rate to (for example) 1217mm/min I need to set frequency at 12981.33333Hz.
frequency = (feed/5)*3200/60
How can I set that accurate frequency on stm32F429 disco?
What am I missing couse I fell that's not how I can control this? :D
Greetings
