oSP0256 Object
An Object that controls an SP0256 voice synthesizer.
Description:
 

A Hardware Object that outputs data to a SP0256 voice synthesizer.  
Note: The SP0256 voice synthesizer chip is an out of production item.  However, it has sustained wide spread popularity and can still be found being occasionally sold from surplus vendors.

Operation:
  When the oSP0256 Object's Value property is set to the address of a phoneme, that phoneme is sent out the I/O Lines specified by the IOGroup, IOLineS and IOLineB, properties in such a way that a SP0256 voice synthesizer chip will output that phoneme.

Setting the String property to a string of data will sequentially send each phoneme to the SP0256 chip.

Storage size & Availability:
 

The following table lists the size and availability of the oSP0256 Object:

ObjectSizeVersion
oSP0256 6 Bytes B.2.0
Properties:
 

The following table lists the Properties of the oSP0256 Object:

PropertyDescription
Address

Returns a pointer to the address of the oSP0256 Object instance.

Data-Type: Address, Read-Only

Data-Range: 0 - 127

IOGroup

The physical I/O group to use for the data connections.

Data-Type: Nibble

Data-Range: 0 - 3

The following table lists the values of the IOGroup Property:
IOGroupNibbleConstantDescription
0 0  

The instance of the oSP0256 Object is inactive.

0 1  

The instance of the oSP0256 Object is inactive.

1 0  

The oSP0256 Object uses pins 8 - 11 for its data I/O.

1 1  

The oSP0256 Object uses pins 12 - 15 for its data I/O.

2 0  

The oSP0256 Object uses pins 16 - 19 for its data I/O.

2 1  

The oSP0256 Object uses pins 20 - 23 for its data I/O.

3 0  

The oSP0256 Object uses pins 24 - 27 for its data I/O.

3 1  

The oSP0256 Object uses pins 28 - 31 for its data I/O.

IOLineS

A value that specifies the physical I/O Line to use for the data strobe connection.

Data-Type: Byte

Data-Range: 1 - 31

IOLineB

A value that specifies the physical I/O Line to use for the Busy connection.

Data-Type: Byte

Data-Range: 0 - 31

Nibble

Specifies which side of an IOGroup to use.

Data-Type: Bit

Data-Range: 0 - 1

The following table lists the values of the Nibble Property:
Nibble Constant Description
0 cvLow

The oSP0256 Object uses the lower 4 bits of the specified IOGroup

1 cvHigh

The oSP0256 Object uses the upper 4 bits of the specified IOGroup

Operate

A value that indicates if an data assigned to the Value property is sent to the LCD.

Data-Type: Bit, Flag

Data-Range: 0 - 1

String

The Value property represented as a string.

Note: When using the String property to send phonemes, the device's busy line IS checked for a non busy status before the data is sent.

Data-Type: String

Value

The value of any ASCII or control character.

Note: When using the String property to send phonemes, the device's busy line IS NOT checked for a non busy status before the data is sent.

Data-Type: Byte, Default

Data-Range: 0 - 255

Example:
  In the following example, the oSP0256 Object is used to say the phrase "The OOPic is talking"
Dim LCD As New oSP0256

Sub Main() 
'This program uses an oSP0256 Object
'to send the phraze 
'      "The OOPic is talking"
'to a GI SP0256-AL2 voice synth chip.
'Other I/O Lines are set up to control
'the other optionally controlled lines on the 
'SP0256-AL2 chip.

Dim SPA as new oSP0256
Dim SBYRESET as new oDio1
Dim SPReset as new oDio1 
Dim TEST as new oDio1 
Dim SE as new oDio1

Sub Main()
 Call SetUp
 do
  Call Reset
  SPA.Value=3
  SPA.string=chr$(18)+chr$(19)
  SPA.Value=3
  SPA.string=chr$(31)+chr$(9)+chr$(12)+chr$(41)
  SPA.Value=3
  SPA.string=chr$(12)+chr$(43)
  SPA.Value=3
  SPA.string=chr$(13)+chr$(23)+chr$(23)+chr$(45)+chr$(42)+chr$(19)+chr$(44)
  SPA.Value=3
  OOPic.Delay = 100
 loop
End Sub

Sub Reset()
  SBYReset.Value = 0
  SPReset.Value = 0
  oopic.delay = 10
  SBYReset.Value = 1   
  SPReset.Value = 1 
  oopic.delay = 10 
End Sub

Sub SetUp()
  SPA.IOGroup = 3
  SPA.IOLineS = 11
  SPA.IOLineB = 8
  SPA.Operate = 1
  SBYReset.IOLine = 13
  SBYReset.Direction = cvOutput
  SBYReset.Value = 0
  SPReset.IOLine = 14
  SPReset.Direction = cvOutput
  SPReset.Value = 0
  TEST.IOLine = 12
  TEST.Direction = cvOutput
  TEST.Value = 0
  SE.IOLine = 10
  SE.Direction = cvOutput
  SE.Value = 1
End Sub