Project 9  Stepper Motor
Neff Site
Macros | Functions
a4988.h File Reference

This module implements an interface for the Stepper 2 Click. More...

#include <stdint.h>

Go to the source code of this file.

Macros

#define A4988_PORT   PORTD
 
#define A4988_STEPS_REV   200L
 
#define A4988_ST_PIN_bp   PIN0_bp
 
#define A4988_ST_PIN_bm   PIN0_bm
 
#define A4988_DIR_PIN_bp   PIN1_bp
 
#define A4988_DIR_PIN_bm   PIN1_bm
 
#define A4988_SL_PIN_bp   PIN2_bp
 
#define A4988_SL_PIN_bm   PIN2_bm
 
#define A4988_RST_PIN_bp   PIN3_bp
 
#define A4988_RST_PIN_bm   PIN3_bm
 
#define A4988_EN_PIN_bp   PIN4_bp
 
#define A4988_EN_PIN_bm   PIN4_bm
 
#define A4988_PINS_gp   PIN0_bp
 
#define A4988_PINS_gm   (PIN0_bm | PIN1_bm | PIN2_bm | PIN3_bm | PIN4_bm)
 

Functions

void a4988_init (void)
 Initializes the stepper motor module. More...
 
void a4988_reset (void)
 Resets the stepper motor module. More...
 
void a4988_on (void)
 Switches the motor on. More...
 
void a4988_off (void)
 Switches the motor off. More...
 
void a4988_left (void)
 Rotating direction is left. More...
 
void a4988_right (void)
 Rotating direction is right. More...
 
void a4988_step (void)
 Advances one step. More...
 

Detailed Description

This module implements an interface for the Stepper 2 Click.

The Stepper 2 Click is based on an Allegro A4988 stepper motor driver.

Author
Wolfgang Neff
Version
2.0
Date
2018-06-02
History
Created: 2017-08-06
Modified: 2018-06-02

Macro Definition Documentation

◆ A4988_DIR_PIN_bm

#define A4988_DIR_PIN_bm   PIN1_bm

◆ A4988_DIR_PIN_bp

#define A4988_DIR_PIN_bp   PIN1_bp

◆ A4988_EN_PIN_bm

#define A4988_EN_PIN_bm   PIN4_bm

◆ A4988_EN_PIN_bp

#define A4988_EN_PIN_bp   PIN4_bp

◆ A4988_PINS_gm

#define A4988_PINS_gm   (PIN0_bm | PIN1_bm | PIN2_bm | PIN3_bm | PIN4_bm)

◆ A4988_PINS_gp

#define A4988_PINS_gp   PIN0_bp

◆ A4988_PORT

#define A4988_PORT   PORTD

◆ A4988_RST_PIN_bm

#define A4988_RST_PIN_bm   PIN3_bm

◆ A4988_RST_PIN_bp

#define A4988_RST_PIN_bp   PIN3_bp

◆ A4988_SL_PIN_bm

#define A4988_SL_PIN_bm   PIN2_bm

◆ A4988_SL_PIN_bp

#define A4988_SL_PIN_bp   PIN2_bp

◆ A4988_ST_PIN_bm

#define A4988_ST_PIN_bm   PIN0_bm

◆ A4988_ST_PIN_bp

#define A4988_ST_PIN_bp   PIN0_bp

◆ A4988_STEPS_REV

#define A4988_STEPS_REV   200L

Function Documentation

◆ a4988_init()

void a4988_init ( void  )

Initializes the stepper motor module.

◆ a4988_left()

void a4988_left ( void  )

Rotating direction is left.

◆ a4988_off()

void a4988_off ( void  )

Switches the motor off.

◆ a4988_on()

void a4988_on ( void  )

Switches the motor on.

◆ a4988_reset()

void a4988_reset ( void  )

Resets the stepper motor module.

◆ a4988_right()

void a4988_right ( void  )

Rotating direction is right.

◆ a4988_step()

void a4988_step ( void  )

Advances one step.

Contact