From fd8cee6000a4242c6741d1acfa8661b985de894e Mon Sep 17 00:00:00 2001 From: Othmar Gsenger Date: Wed, 6 Feb 2013 00:14:26 +0000 Subject: full steps git-svn-id: https://svn.spreadspace.org/avr/trunk@121 aa12f405-d877-488e-9caf-2d797e2a1cc7 --- usb-i2c-sl018/stepper.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'usb-i2c-sl018/stepper.c') 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 #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) -- cgit v1.2.3