Вы находитесь на странице: 1из 1

Microstep C program for National Semi LMD18245/PIC microstepping driver

board.
Changlog
April 7, 2005 Added current reduction code, driver output current reduced
after 3 minutes.
Changed microstep10 pulse routine for faster step rate.
Added two new sine wave lookup tables, microstep8new and
microstep10new. The lookup table is offset by a few degrees.
These need to be tested to see if they work better.
July 27, 2006 Version 2.0
There is a internal hardware bug in the LMD18245 chip causing i
t to switch incorrectly. This makes
the motor have less torque in one direction at higher speeds, h
owever the motor does not loose step position.
You can only switch the LMD chip direction lines (DIR A and DIR
B) when the DAC value is zero. This bug was found by
RadekCX, a CNCZONE member and verified by alan@fromorbit.com (P
ICSTEP)
My quick fix is to make a new updated sine table that is sent t
o the stepper motor when the Direction
input line is high.
Bug fix only for halfstep_torque, microstep4, microstep8 and mi
crostep10 lookup tables.
Removed microstep8new and microstep10new lookup tables since th
ey don't work any better.
mstep_cr_v2.c

C source code for stepper board, compiled with PCW CCS

Hex files are compiled for a Microchip PIC16F627 mcu.


Use this code at your own risk, no guarantee that it will work for you.
This source code is for Non-commercial personal use only. If you want to use
this code for any other purpose, please contact sales@embeddedtronics.com for
a commercial license.
Embedded Acquisition Systems
www.embeddedtronics.com
copyright 2004-2006

Вам также может понравиться