TMC428 – Application Note - Trinamic
TMC428 – Application Note - Trinamic
TMC428 – Application Note - Trinamic
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>TMC428</strong> <strong>–</strong> <strong>Application</strong> <strong>Note</strong> <strong>–</strong> <strong>TMC428</strong> Getting Started <strong>–</strong> Including StallGuard TM 17<br />
(v. 2.00 / April 14, 2008)<br />
5. Overview of 'tmc428demo'<br />
These routines all together build a simple example application to control the <strong>TMC428</strong>. One can directly<br />
run it together with an <strong>TMC428</strong> evaluation kit. Evaluation kits are available via TRINAMIC distributors.<br />
These sources are distributed in the hope that they will be useful. They might be a base for your own<br />
application. The C code has been compiled using MS Visual C++ 6.0 to build the tmc428demo.exe<br />
win32 console application.<br />
rs232win.c : routines to access RS232 under win32 (Win9x, NT4, Win2k, XP...)<br />
rs232win.h : header file for rs232win.c<br />
tmc428spi.c : SPI routine tmc428spi() - calling tmc428spi4win() for the win32 application<br />
tmc428spi.h : header file of tmc428spi.c<br />
tmc428spi4win.c : routines to access a <strong>TMC428</strong> on evaluation board via RS232 under win32<br />
tmc428spi4win.h : header file of tmc428spi4win.c<br />
tmc428_base.c : basic <strong>TMC428</strong> access routines (basic register IO, ...) using tmc428spi.c<br />
tmc428_base.h : header file for tmc428_base.c<br />
tmc428_misc.c : Miscellaneous routines (dump of internal <strong>TMC428</strong> configuration RAM, calculation<br />
of full step frequency from <strong>TMC428</strong> parameters, StallGuard demonstration and<br />
StallGuard profiler)<br />
tmc428_misc.h : header file for tmc428_misc.c<br />
tmc428demo.c : MAIN program demo using routines of 'tmc428spi.c', 'tmc428_base.c', ...<br />
tmc428demo.exe : Win32 executable - run this program from console (execute: cmd.exe)<br />
The LSMD is set to 1 (=2 drivers) for the <strong>TMC428</strong> evaluation kit.<br />
6. Overview of 'Sample428_236'<br />
This example can be used as a frame for an own micro controller based application. It is written in a<br />
compact form. In contrast to the 'tmc428demo' - where a separate routine is available for each type of<br />
register <strong>–</strong> the single routine Send428() is used to handle directly the communication with the<br />
<strong>TMC428</strong>. The SPI datagrams are composed directly <strong>–</strong> supported by a set of macros.<br />
Sample428_236.c : frame for a stand alone micro controller application<br />
Sample428_236.h : header file for Sample428_236.c<br />
Copyright © 2005-2008 TRINAMIC Motion Control GmbH & Co. KG