Embedded C Firmware for a PIC-based Stepper Motor Controller
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
diagrams
docs
.gitattributes
.gitignore
Commands.h
Driver.asm
Driver.dbg
Driver.dlt
Driver.hex
Driver.lst
Driver.ppc
Driver.wch
Driver_callertable.txt
Functions.h
Go.h
LCD.h
Pins.h
Strings.h
Vars.h
main.c
main.cp
main.mcl
main.mil
readme.md

readme.md

Omega

Overview

This is an embedded C firmware for a multi-axis stepper motor controller based on PIC16F877. The firmware sets up a command-prompt serial interface on a PIC device and can drive up to three M325 stepper motor drivers (http://www.leadshine.com/UploadFile/Down/M325d.pdf) (or any equivalent PWM-based drivers).

A main feature of the firmware is support for asynchronous operation. The controller uses the PIC16F877 Timer device and interrupt service routines to implement a form of "pseudo multi-threading". This allows precise PWM control and serial communication to take place simultaneously.

Refer to the documentation for details about the protocol, circuit connections and controller operation.

The code is written in MikroC Embedded C for PIC (http://www.mikroe.com/mikroc/pic/) which is an excellent compiler and IDE for PIC-based project development.

Circuit Diagram

Screenshot

Protocol on HyperTerminal

Screenshot

LCD Display

Screenshot Screenshot