Home           Info Request           Quote/Order           Contact           Site Map           About           Search           Support/FAQ  

 ARobot Hidden Coprocessor Commands
Back to ARobot Projects Page

coprocessor

What is a Coprocessor?
ARobot's controller board contains a PIC 16C84 microcontroller which is used as a coprocessor to control the drive motor and the 4 RC servo motors. It receives commands from the Basic Stamp II and helps distribute the software load.

Hidden Commands
Shhhhhh, don't tell anyone but there are a few hidden commands that ARobot's coprocessor can respond to which aren't listed in the User Guide. Read on to see what they do and how you can benefit from using them.

What Coprocessor Version do you have?
This document pertains to coprocessor version 1.1. You can find out what your coprocessor software version is by using the GETVER.BS2 program - Click here to see it.


Auto Motor Off Command
This command causes the main drive motor (Motor #1 on the H-bridge) to automatically stop when RB7 (pin 13) on the coprocessor goes low.

Uses:
You can attach whiskers, emergency stop switch, or another processor's signal to RB7 and turn off the drive motor. This allows other devices besides the Basic Stamp II main processor to shut off the motor.

Syntax

!1A1    --  Enable RB7 control of motor stop.
!1A0    --  Disable RB7 control of motor stop.
Notes:
The main processor will not be told when the motor has been turned off by RB7 control. The main processor will have to read the encoder position twice and compare the results to see if the motor is turning or not.

See ARobot's Controller Schematic for more information.


Read Coprocessor Input Pins
This command allows the programmer to actually use pins on the coprocessor as general purpose input pins.

Uses:
Use this command when you run out of input pins on your main processor.

Syntax

!1Ix     Where x = 1 - 8 indicating pin

               1 = RC servo #1 (steering servo)
               2 = RC servo #2
               3 = RC servo #3
               4 = RC servo #4
               5 = RB7
               6 = RB1 (normally controls H-bridge #2)
               7 = RB2 (normally controls H-bridge #2)
               8 = RB3 (normally controls H-bridge #2)
            
A '0' or '1' is returned depending on the state of the pin.
Notes:
When using the RC servo motor pins as inputs, you obviously can not use them as RC servo control pins.

RB7 is connected to the body cable and would be easy to wire to a rear whisker.

RB1, RB2, and RB3 normally go to the L298 H-bridge to control the second DC motor port also known as the Powerful Output. To use these pins as inputs, you'll need to disconnect them from the L298.

These signals can be wired over to the unused expansion connector pins to make cabling easier.

See ARobot's Controller Schematic for more information.


Output to Coprocessor Pins
This command allows coprocessor pins to be used as general purpose output pins to control external devices.

Uses:
Use this command when you run out of output pins on your main processor.

Syntax

!1Oxy    Where x = 1 - 8 indicating pin

               1 = RC servo #1 (steering servo)
               2 = RC servo #2
               3 = RC servo #3
               4 = RC servo #4
               5 = RB7
               6 = RB1 (normally controls H-bridge #2)
               7 = RB2 (normally controls H-bridge #2)
               8 = RB3 (normally controls H-bridge #2)

          Where y = 0 - 1
          
               0 = low (off)
               1 = high (on)

An 'A' is returned indicating "accomplished".

Notes:
When using the RC servo motor pins as outputs, you obviously can not use them as RC servo control pins.

RB7 is connected to the body cable and would be easy to wire to external devices.

RB1, RB2, and RB3 normally go to the L298 H-bridge to control the second DC motor port also known as the Powerful Output. To use these pins as outputs, you'll need to disconnect them from the L298.

These signals can be wired over to the unused expansion connector pins to make cabling easier.

See ARobot's Controller Schematic for more information.


  Home           Info Request           Quote/Order           Contact           Site Map           About           Search           Support/FAQ  
Copyright (c) Arrick Robotics - ArrickRobotics.com