diff options
author | Othmar Gsenger <otti@wirdorange.org> | 2013-02-06 00:14:26 +0000 |
---|---|---|
committer | Othmar Gsenger <otti@wirdorange.org> | 2013-02-06 00:14:26 +0000 |
commit | fd8cee6000a4242c6741d1acfa8661b985de894e (patch) | |
tree | 6ae3a92930e16ecd34324de9240d4e3366dfb072 | |
parent | motor with timer working (diff) |
full steps
git-svn-id: https://svn.spreadspace.org/avr/trunk@121 aa12f405-d877-488e-9caf-2d797e2a1cc7
-rw-r--r-- | usb-i2c-sl018/stepper.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/usb-i2c-sl018/stepper.c b/usb-i2c-sl018/stepper.c index 4264a42..673b494 100644 --- a/usb-i2c-sl018/stepper.c +++ b/usb-i2c-sl018/stepper.c @@ -25,7 +25,8 @@ #include <avr/interrupt.h> #include "stepper.h" - +//half steps +/* uint8_t step_table [] = { 10, // 1010 @@ -37,6 +38,15 @@ uint8_t step_table [] = 6, // 0110 2, // 0010 }; +*/ +//Full steps +uint8_t step_table [] = +{ + 10, // 1010 + 9, // 1001 + 5, // 0101 + 6, // 0110 +}; #define STEPPER_PORT PORTF #define STEPPER_DDR DDRF @@ -46,7 +56,7 @@ uint8_t step_table [] = #define STEPPER_OUTPUT_BITMASK (~(0xF << STEPPER_FIRST_BIT )) volatile uint16_t step_cnt = 0; -static uint16_t step_cnt_max = LENGTH_STEP_TABLE*200; +static uint16_t step_cnt_max = LENGTH_STEP_TABLE*2000; stepper_direction_t step_direction = dir_open; inline void stop_stepper(void) |