Main Page | Data Structures | File List | Data Fields | Globals | Related Pages

AVR446 - Linear speed control of stepper motor Documentation

Atmel AVR Application Note

Introduction

This documents data structures, functions, variables, defines, enums, and typedefs in the software for application note AVR446.

Compilation Info

This software was written for the IAR Embedded Workbench 4.11A.

To make project:

  1. Add the file main.c, sm_driver.c, speed_cntr.c and uart.c to project.
  2. Under processor configuration, select desired Atmel AVR device.
  3. Enable bit definitions in I/O include files
  4. Compiler optimizations must be size medium or high optimization to fit the code in a mega48.

Device Info

The included source code is written for all Atmel AVR devices with 16 bit timers.

Hardware Setup

Fuse settings: 0xFF, 0xDD, 0xC0 (External Clock running on 3,68Mhz).

Port Connections:

  1. PD0 - Serial RXD.
  2. PD1 - Serial TXD.
  3. PD4 - Stepper motor winding B2.
  4. PD5 - Stepper motor winding B1.
  5. PD6 - Stepper motor winding A2.
  6. PD7 - Stepper motor winding A1.

ToDo List

Todo:
Specify the running frequency T1_FREQ according to the timer frequency

Specify the number of fullsteps in FSPR

Modify the SM_PORT and SM_DRIVE to support desired drive port.

Modify A1, A2, B1 and B2 to support the pins on the desired drive port.

Set the stepping mode in HALFSTEPS to either halfsteps (HALFSTEPS) or fullsteps (FULLSTEPS)


Generated on Mon May 8 15:05:03 2006 for AVR446 - Linear speed control of stepper motor by doxygen 1.3.7