
Software Commands
Bit Pattern
Name
0001BBB0
INPUT
0001BBB1
OUTPUT
0010BBB0
LOW
0010BBB1
HIGH
0011BBB0
BITREAD
0100BBB0
REVERSE
0100BBB1
TOGGLE
0101BBB0
PULSOUT
Argument
None
None
None
None
None
None
None
PLEN
Returns
0
0
0
0
0 or 1
0
0
0
Description
Sets pin to input
Sets pin to output
Sets pin to output and set state low
Sets pin to output and set state high
Reads input pin
Sets input to output and vice versa
Toggles output pin
Pulses out (duration is a 16-bit word
specifying 4uS units)
Measures low pulse in 4uS units (PLEN is
16-bits)
Same as PULSIN0 but measures a high
pulse
Shift data in using pin as data and the next
pin as clock; MBITS specifies a mode and
bit length.
Shift data out using pin as data and the
next pin as clock; MBITS specifies a mode
and bit length
Counts transitions on pin for specified
period (16-bit word in 8uS units). Returns
16-bit count
PWM on pin with specified duty cycle
(byte) and period (2ms per unit; 16-bits)
Measure RC charge in 4uS units (16-bits)
Measure RC discharge in 4uS units (16-
bits)
Read EEPROM (address is a byte from 0-
63)
Writes EEPROM (address is a byte from
0-63)
Gets quasi-random byte
Turns off pull up resistors
Turns on pull up resistors
Makes single tone. Frequency is 16-bit
word (Hertz), Period is 16-bit word
(milliseconds)
Like FREQOUT, but makes two tones
0110BBB0
PULSIN0
None
0,PLEN
0110BBB1
PULSIN1
None
0,PLEN
0111BBB0
SHIFTIN
MBITS
0,BYT
0111BBB1
SHIFTOUT
MBITS, BYT
0
1000BBB0
COUNT
PER
0,CT
1001BBB0
PWM
DUTY, PER
0
1010BBB0
1010BBB1
RCTIME0
RCTIME1
None
None
0,PLEN
0,PLEN
10110000
READ
ADDR
0,BYT
10110010
WRITE
ADDR, BYT
0
10110011
11000000
11000001
1101BBB0
GETRAND
PULLOFF
PULLON
FREQOUT
None
None
None
FREQ,
PERIOD
0,BYT
0
0
0
1101BBB1
FREQOUT2
FREQ, FREQ,
PERIOD
None
0
10110110
Notes and Key:
BBB = Bit number (0-7) corresponding to B0 to B7
PLEN = 16-bit word specifying pulse length in 4uS units
MBITS = 8-bit value. Top 4 bits specify mode (see reference); bottom 4 bits indicate bit length (1-8)
BYT = Byte value
PER = 16-bit period in 8uS units
DUTY = Byte indicating duty cycle in 1/255 units
ADDR = EEPROM address (byte) from 0 to 63
FREQ = Frequency (16-bits) in Hertz
PERIOD = Duration (16-bits) in milliseconds
CHECK
$31
Communications/version check