Full H Bridge Microstepping Stepper Motor Demo software

Dependencies:   mbed

smclut.h

Committer:
jeroen3
Date:
2013-10-08
Revision:
0:8e4a6920a484

File content as of revision 0:8e4a6920a484:

#ifndef _SMCLUT_H_
#define _SMCLUT_H_

#include <stdint.h>

const uint16_t LUT_H1[32] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
};

const uint16_t LUT_H2[32] = {
0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
};

const uint16_t LUT_H3[32] = {
1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1
};


const uint16_t LUT_H4[32] = {
0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,
};   
   

uint16_t LUT_L1[32] = {
0      ,102,194 ,286 ,
363 ,424,471 ,501 ,
512 ,501,471 ,424 ,
363 ,286,194 ,102 ,
0      ,0      ,0      ,0      ,
0      ,0      ,0      ,0      ,
0      ,0      ,0      ,0      ,
0      ,0      ,0      ,0      
};

uint16_t LUT_L2[32] = {
0      ,0      ,0      ,0      ,
0      ,0      ,0      ,0      ,
0      ,0      ,0      ,0      ,
0      ,0      ,0      ,0      ,
0      ,102  ,194,286 ,
363 ,424 ,471 ,501 ,
512    ,501 ,471 ,424 ,
363 ,286 ,194 ,102.  
};

uint16_t LUT_L3[32] =  {
0      ,0      ,0      ,0      ,
0      ,0      ,0      ,0      ,
0      ,102 ,194 ,286 ,
363 ,424 ,471 ,501 ,
512 ,501 ,471 ,424 ,
363 ,286 ,194 ,102  ,
0      ,0      ,0      ,0      ,
0      ,0      ,0      ,0
};

uint16_t LUT_L4[32] =  {
512 ,501,471 ,424 ,
363 ,286,194 ,102 ,
0   ,0  ,0   ,0   ,
0   ,0  ,0   ,0   ,
0   ,0  ,0   ,0   ,
0   ,0  ,0   ,0   ,
0   ,102,194 ,286 ,
363 ,424,471 ,501
};
        
				
#endif