Definition in file sm_driver.h.
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Defines | |
#define | A1 PD7 |
Stepper motor winding A positive pole. | |
#define | A2 PD6 |
Stepper motor winding A negative pole. | |
#define | B1 PD5 |
Stepper motor winding B positive pole. | |
#define | B2 PD4 |
Stepper motor winding B negative pole. | |
#define | CCW 1 |
#define | CW 0 |
#define | HALFSTEPS |
#define | SM_DRIVE DDRD |
#define | SM_PORT PORTD |
Functions | |
void | sm_driver_Init_IO (void) |
Init of io-pins for stepper motor. | |
unsigned char | sm_driver_StepCounter (signed char inc) |
Move the stepper motor one step. | |
void | sm_driver_StepOutput (unsigned char pos) |
Convert the stepcounter value to signals for the stepper motor. | |
Variables | |
int | stepPosition |
Position of stepper motor. |
|
Stepper motor winding A positive pole.
Definition at line 43 of file sm_driver.h. Referenced by sm_driver_Init_IO(). |
|
Stepper motor winding A negative pole.
Definition at line 44 of file sm_driver.h. Referenced by sm_driver_Init_IO(). |
|
Stepper motor winding B positive pole.
Definition at line 45 of file sm_driver.h. Referenced by sm_driver_Init_IO(). |
|
Stepper motor winding B negative pole.
Definition at line 46 of file sm_driver.h. Referenced by sm_driver_Init_IO(). |
|
Definition at line 26 of file sm_driver.h. Referenced by sm_driver_StepCounter(), and speed_cntr_Move(). |
|
Definition at line 25 of file sm_driver.h. Referenced by speed_cntr_Move(). |
|
Define stepping mode to use in stepper motor. Either halfsteps (HALFSTEPS) or fullsteps (FULLSTEPS) are allowed. Definition at line 33 of file sm_driver.h. |
|
Definition at line 42 of file sm_driver.h. Referenced by sm_driver_Init_IO(). |
|
Define IO port and pins Set the desired drive port and pins to support your device Definition at line 41 of file sm_driver.h. Referenced by sm_driver_Init_IO(), and sm_driver_StepOutput(). |
|
Init of io-pins for stepper motor.
Definition at line 49 of file sm_driver.c. References A1, A2, B1, B2, SM_DRIVE, and SM_PORT. Referenced by Init().
|
|
Move the stepper motor one step. Makes the stepcounter inc/dec one value and outputs this to the steppermotor. This function works like a stepper motor controller, a call to the function is the stepping pulse, and parameter 'inc' is the direction signal.
Definition at line 66 of file sm_driver.c. References CCW, sm_driver_StepOutput(), and stepPosition. Referenced by speed_cntr_TIMER1_COMPA_interrupt().
Here is the call graph for this function: ![]() |
|
Convert the stepcounter value to signals for the stepper motor. Uses the stepcounter value as index in steptab to get correct steppermotor control signals. Converts these signals to work with the stepper driver hardware.
Definition at line 108 of file sm_driver.c. References SM_PORT, and steptab. Referenced by Init(), and sm_driver_StepCounter().
|
|
Position of stepper motor.
Definition at line 53 of file sm_driver.h. Referenced by main(), and sm_driver_StepCounter(). |