English
Language : 

PAK-IV Datasheet, PDF (5/14 Pages) List of Unclassifed Manufacturers – Using the PAK-IV I/O Coprocessor
Software Commands
Bit Pattern Name
Argument
Returns Description
0001BBB0 INPUT
None
0
Sets pin to input
0001BBB1 OUTPUT
None
0
Sets pin to output
0010BBB0 LOW
None
0
Sets pin to output and set state low
0010BBB1 HIGH
None
0
Sets pin to output and set state high
0011BBB0 BITREAD
None
0 or 1
Reads input pin
0100BBB0 REVERSE
None
0
Sets input to output and vice versa
0100BBB1 TOGGLE
None
0
Toggles output pin
0101BBB0 PULSOUT
PLEN
0
Pulses out (duration is a 16-bit word
specifying 2uS units)
0110BBB0 PULSIN0
None
0,PLEN Measures low pulse in 2uS units
(PLEN is 16-bits)
0110BBB1 PULSIN1
None
0,PLEN Same as PULSIN0 but measures a high
pulse
0111BBB0 SHIFTIN
MBITS
0,BYT
Shift data in using pin as data and the
next pin as clock; MBITS specifies a
mode and bit length.
0111BBB1 SHIFTOUT MBITS, BYT 0
Shift data out using pin as data and the
next pin as clock; MBITS specifies a
mode and bit length
1000BBB0 COUNT
PER
0,CT
Counts transitions on pin for specified
period (16-bit word in 4uS units).
Returns 16-bit count
1001BBB0 PWM
DUTY, PER 0
PWM on pin with specified duty cycle
(byte) and period (1ms per unit; 16-
bits)
1010BBB0 RCTIME0
None
0,PLEN Measure RC charge in 2uS units (16-
bits)
1010BBB1 RCTIME1
None
0,PLEN Measure RC discharge in 2uS units
(16-bits)
10110000
READ
ADDR
0,BYT
Read RAM (address from 0-$5F)
10110010
WRITE
ADDR, BYT 0
Writes RAM (address from 0-$5F)
10110011
GETRAND None
0,BYT
Gets quasi-random byte
11000000
PULLOFF
None
0
Turns off pull up resistors on BANK A
11000001
PULLON
None
0
Turns on pull up resistors on BANK A
1101BBB0 FREQOUT FREQ,
0
Makes single tone. Frequency is 16-bits
PERIOD
(Hertz), Period is 16-bits (milliseconds)
1101BBB1 FREQOUT2 FREQ, FREQ, 0
Like FREQOUT, but makes two tones
PERIOD
10110110
CHECK
None
$41
Communications/version check
1011100X BANKSEL None
0
Select BANK A (X=0) or BANK B
(X=1)
Notes and Key:
• BBB = Bit number (0-7) corresponding to B0 to B7
• PLEN = 16-bit word specifying pulse length in 2uS 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 4uS units
• DUTY = Byte indicating duty cycle in 1/255 units
• ADDR = RAM address (byte) from 0 to $5F
• FREQ = Frequency (16-bits) in Hertz
• PERIOD = Duration (16-bits) in milliseconds