|
Fram my reading of the pcode interpreter source, you only get the option of
doing all motors or none by default.
It doesn't look like it would be too difficult to modify the pcode to only
do the first two motors. You can get the source at:
ftp://cherupakha.media.mit.edu/pub/projects/interactive-c/source/pcode-2.81-
dist.tar.Z
and:
http://el.www.media.mit.edu/groups/el/projects/handy-board/software/pcode.as
m
-chris
#else
#if defined (SBOT) | defined (REV21) | defined (HANDYBOARD)
* PWM code for sensor robot and Rev 2.1 Board *****************8
*
* motor direction selected by low nybble of DIGOUTPUT
* motors enabled by high nybble of DIGOUTPUT
*
* check if pulse width modulation is enabled
LDAB motor
LDAA system_functions
ANDA #PWM
BEQ SPDexit ; if zero, exit w/o modulation
LDAA speeda ; rotate bits in motor speed
ASLA
BCC SPDoffA
ADDA #1
EORB #%00010000
BRA SPDsetA
SPDoffA ORAB #%00010000
SPDsetA STAA speeda
LDAA speedb ; rotate bits in motor speed
ASLA
BCC SPDoffB
ADDA #1
EORB #%00100000
BRA SPDsetB
SPDoffB ORAB #%00100000
SPDsetB STAA speedb
LDAA speedc ; rotate bits in motor speed
ASLA
BCC SPDoffC
ADDA #1
EORB #%01000000
BRA SPDsetC
SPDoffC ORAB #%01000000
SPDsetC STAA speedc
LDAA speedd ; rotate bits in motor speed
ASLA
BCC SPDoffD
ADDA #1
EORB #%10000000
BRA SPDsetD
SPDoffD ORAB #%10000000
SPDsetD STAA speedd
EORB #$F0
SPDexit STAB DIGOUTPUT
*************************** end of sensor robot PWM code
----- Original Message -----
From: "Kah Mun" <lowk@union.edu>
To: <lugnet.robotics.handyboard@lugnet.com>
Sent: Tuesday, December 21, 1999 11:49 AM
Subject: speed control bytes
>
> i understand that when the PWM is off, the mask: 0b11111111 switches all motor
> ports on in the forward direction. but if the PWM is on, what bit string
> correspond to what speed?
>
> is it possible to have motor ports 0 and 1 controlled using PWM while ports 2
> and 3 are not?
>
|
|
Message is in Reply To:
| | speed control bytes
|
| i understand that when the PWM is off, the mask: 0b11111111 switches all motor ports on in the forward direction. but if the PWM is on, what bit string correspond to what speed? is it possible to have motor ports 0 and 1 controlled using PWM while (...) (25 years ago, 21-Dec-99, to lugnet.robotics.handyboard)
|
2 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|