Intellecta Technologies Pty Ltd

for PICAXE education, Roland CAM, Techsoft CAD, Intellecta control, Atmel, Arm and Microchip education

Control7 motors02

Program 3 : Motors!!!!

This program is aimed to control the direction of a motor connected to the Motor1 connection.

It is useful to read up on the control of a motor with the 293D control chip that requires 2 connections to the PICAXE to set the direction.

Use the help file structure in the Programming Editor to access the help file.

The circuit schematic shows four lines connected to the 293D H bridge driver chip.

Motor 1 forward - High OUT1, Low OUT0

Motor 1 reverse - Low OUT1, High OUT0

Motor 2 forward - High OUT2, Low OUT3

Motor 2 forward - Low OUT2, High OUT3

 


Program 3

This program shows the use of the Subroutines that make it easier to understand the strategy and assist in planning.

The main program reads the state of the pushbutton. There are three subroutines.

Subroutine flashled : this subroutine just flashes the light1 so you have some feedback that the system is running.

Subroutine motorfwd: this subroutine turns on and off the appropriate motor lines

Subroutine motorrvse: this subroutine reverses the motor lines

Motor control flowchart

Program 3

This program shows the use of the Subroutines that make it easier to understand the strategy and assist in planning.

The main program reads the state of the pushbutton. There are three subroutines.

Subroutine flashled : this subroutine just flashes the light1 so you have some feedback that the system is running.

Subroutine motorfwd: this subroutine turns on and off the appropriate motor lines

Subroutine motorrvse: this subroutine reverses the motor lines.

 


Program 3 - Download

Convert the flowchart to BASIC code and download.

You will see a constant flash of LIGHT1 and the motor leds change colour when the switch is pressed.

Motor control basic code
[Home] [About] [News] [Events] [Products] [CAD] [CAM] [Control] [Mechatronics] [Science] [Materials] [Support] [Map] [Contact]

PICMicro & Microchip logo are registered trademarks of Microchip Technology Inc. AZ. Atmel AVR & Atmel logo are registered trademarks of Atmel Corporation. CA. Philips Logo is a registered trademark of Philips Semiconductor Inc & Philips SA, Netherlands. Picaxe is a registered Trade mark of Microchip. Intellecta is a registered trademark of Intellecta Technologies. All other logos and trademarks are the property of their respective owners.  Revision Date June2006

© 1997- 2006 Intellecta Technologies - All rights reserved - email: supportatintellectadotnet