SPC  Version 0.9.5
 All Files Functions Groups Pages
StrobeControl

This variable allows control over the 6 strobe lines.

See Strobe control constants.

D31-D6D5D4D3D2D1D0
-WRRDS3S2S1S0
Strobe Lines

There are 4 general purpose outputs, S0 - S3. These 4 lines may be used as digital outputs. There are 2 special purpose outputs, RD and WR. These lines are automatically activated when DigitalIn is read or DigitalOut is written. When DigitalIn is read, the RD output will pulse for about 10 S. If the StrobeControl RD bit is 0, the RD output will pulse high, if the bit is 1, the output will pulse low.

strobe1.png

The timing for a read. An external device which is relying on the RD strobe output for synchronizing with the SuperPro hardware may use the leading edge of the RD strobe to present data on B0 - B7. The device must have the data ready within 9 microseconds of the start (leading edge) of the RD strobe. The timing for a write.

strobe2.png

An external device which is relying on the WR strobe output for synchronizing with the SuperPro hardware may use the leading edge of the WR strobe as either an edge type clock or a latch type due to the data being presented on B0 - B7 at least 1 microsecond before the strobe is active until 1 microsecond after.

DigitalControl = 0xFF ; //set B0 - B7 as outputs
DigitalOut = outputbyte ;
DigitalControl = 0x00 ; //reset B0 - B7 to inputs
strobe3.png

In a typical example of using the strobes to use the B0-7 bus bi-directionally:

StrobeControl = 0x10 ; //set RD active low and WR active high
DigitalControl = 0x00 ; //ensure outputs are inactive
// ...
datain = DigitalIn ; //read DATAIN byte
// ...
DigitalControl = 0xFF ; //set B0 - B7 as outputs
DigitalOut = dataout ; //write DATAOUT byte
DigitalControl = 0x00 ; //reset B0 - B7 to inputs