28824 Parallax Inc, 28824 Datasheet
![SERVOPAL SERVO PULSER TIMER](/photos/28/96/289633/28824-l_sml.jpg)
28824
Specifications of 28824
Related parts for 28824
28824 Summary of contents
Page 1
... ServoPAL (#28824): Servo Pulser and Timer General Description The ServoPAL is a tiny module that plugs in between your BASIC Stamp and two servo motors to pulse the motors so your PBASIC program doesn’t have to. In addition, it provides an “alarm clock” function to perform timing in the background while the BASIC Stamp is busy with other tasks. ...
Page 2
Servo 1 Servo 0 Vdd Vdd Gnd Gnd Top View Below is a photo of the ServoPAL installed on a BOE-Bot’s P12/P13 servo header. The wheel servo motor cables are plugged into the ServoPAL. In this case, the /Inp input ...
Page 3
BS2} ' {$PBASIC 2.5} nInp PIN 12 Alarm PIN 13 Restart: INPUT nInp DO UNTIL nInp LOOP LOW nInp PAUSE 100 HIGH nInp This sequence accomplishes a couple things systems, like the BOE-Bot, where the servo ...
Page 4
Servo 0 Servo 1 To terminate a sequence of pulses on /Inp, just wait at least 2mS before sending another pulse. This signals the ServoPAL that the next pulse is intended for Servo 0. Now, what if you want ...
Page 5
Pulse widths outside the individual ranges shown may have unpredictable effects. Programming the Alarm Function In addition to servo control, the ServoPAL has an alarm clock (timer) function. You can set an alarm to ...
Page 6
Simple Example Program Here’s a simple-minded BS2 program that moves a BOE-Bot forward for 5 seconds, then in reverse for five seconds, using the Alarm output as a timer: ' ========================================================================= ' ' File...... ServoPAL_Simple_Demo.bs2 ' Purpose... Demonstrate ServoPAL capabilites ...
Page 7
The program works like this: 1. Start the BOE-Bot moving forward. 2. Keep checking for obstacles until one is found obstacle is on left or right, begin turning in opposite direction obstacle is in front, back ...
Page 8
BOTH CON 3 BKWD CON 0 FWD CON 3 ' -----[ Variables ]------------------------------------------------------- Obstacle VAR Nib Move VAR Nib Time VAR Word ' -----[ Initialization ]-------------------------------------------------- INPUT nInp DO : LOOP UNTIL nInp LOW nInp PAUSE 100 HIGH nInp PAUSE ...
Page 9
Obstacle.BIT1 = ~IRdetL RETURN '------[ DoMotor ]--------------------------------------------------------- ' Start motors turning to move BOE-Bot in direction indicated. If Time > then set alarm and clear Time to zero. DoMotor: IF (Move = BKWD) THEN PULSOUT nInp, 900 PULSOUT ...