oSP0256 Object

Back to top of page Description:
 

The oSP0256 Object is 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.

If you need an in-production device, the Soundgin™ can do everything the SP0256 did plus music.

 The following table lists the size and availability of the oSP0256 Object.
 ObjectSizeDescriptionA1A2B1B2C1
oSP02566 BytesControls a SP0256 Voice Synthesizer Chip.xx
Back to top of page Operation:
 The oSP0256 Object uses one I/O Group and two I/O Lines to control a SP0256 voice synthesizer chip.

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 VString property to a string of data will sequentially send each phoneme to the SP0256 chip.

Once the SP0256 receives the phoneme address to output, it will begin the sound output and indicate that it is busy.  If another phoneme address is written before the first stops, one of two things can happen depending on how the phoneme address was sent. 

If the phoneme address was sent via the Value property, then the SP0256 will not be checked to see if it is busy.  As a result, If the phoneme address was sent while the SP0256 was busy, then that address will be lost. 

If the phoneme address was sent via the VString property, then the SP0256 will be checked to see if it is busy.  As a result, the program will wait for it to become ready before the phoneme address is sent.

The DIO property is an instance of the oDIO8F object which is created when the oSP0256 object is.  The oSP0256 object configures the oDIO8F object in such a way that it will provide the proper I/O control of the SP0256 Voice Chip.  Changing attributes of the oDIO8F may change the way the SP0256 behaves to something different than the way described in this document.  (see oDIO8F object for more detail on how the oDIO8F Object sends data to the SP0256)

Back to top of page Properties:

The following table lists the properties of the oSP0256 Object:

Property

Description

Value
A value that specifies which sound the Voice Chip is to make.
Object Class: oByte Value Range: 0 - 255
Data Type: Numeric (Write-Only) Default Value: 0
Note: When using the Value property to send phonemes, the device's busy line IS NOT checked for a non busy status before the data is sent. 
VString
A string version of the Value property.
Object Class: oProperty
Data Type: Numeric (Write-Only)
Note: When using the VString property to send phonemes, the device's busy line IS checked for a non busy status before the data is sent.
IOGroup
A value that specifies which group of 8 I/O lines is connected to the Voice Chip's Address lines. (Pins 10-18 except 12)
Object Class: oIOGroup Value Range: 0 - 3
Data Type: Numeric Default Value: 0
Note that only the Least-Significant 6 data bits are used out of the 8 I/O lines.
Some I/O Lines have special purposes.  Be sure to see oIOGroup for details.
IOLineB
A value that specifies which I/O Line is connected to the Voice Chip's Load Request (LRQ) line (Pin 9)
Object Class: oIOLine Value Range: 0 - 31
Data Type: Numeric Default Value: 0
Some I/O Lines have special purposes.  Be sure to see oIOLine help file for details.
IOLineS
A value that specifies which I/O Line is connected to the Voice Chip's Address Load (ALD) line (Pin 20)
Object Class: oIOLine Value Range: 0 - 31
Data Type: Numeric Default Value: 0
Some I/O Lines have special purposes.  Be sure to see oIOLine help file for details.
Operate
A value that selects if new data is sent to the Voice Chip.
Object Class: oOperate Value Range: 0 - 1
Data Type: Numeric Default Value: 0
OperateConstantDescription
0cvOffThe new data is not sent to the Voice Chip.
1cvOnThe new data is sent to the Voice Chip.
DIO
The I/O function object used to control the Voice Chip.
Object Class: oDIO8F Value Range: 0 - 255
Data Type: Numeric Default Value: 0
When the oSP0256 object is created, it configures its oDIO8F Object to have a Busy Line input with the following assignment:

Attributes of the operation can be adjusted by directly manipulating the oDIO8F object, but note that doing so may change the way the SP0256 behaves to something different than the way described in this document.

Address
Returns a pointer to the address of the oCounter Object instance.
Object Class: oAddress Value Range: 0 - 127
Data Type:Pointer (Read Only) Default Value: Address of Object

Back to top of page Examples:
 In the following example, the oSP0256 Object is used to say the phrase "The ooPIC is talking"
'This program uses an oSP0256 Object
'to send the phrase 
'      "The ooPIC is talking"
'to a GI SP0256-AL2 voice 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

Sub Main() 
  SPA.IOGroup = 3  
  SPA.IOLineS = 11  
  SPA.IOLineB = 8  
  SPA.Operate = 1
  Do  
    SPA.Value=3  
    SPA.VString=Chr$(18)+Chr$(19)  
    SPA.Value=3  
    SPA.VString=Chr$(31)+Chr$(9)+Chr$(12)+Chr$(41)  
    SPA.Value=3  
    SPA.VString=Chr$(12)+Chr$(43)  
    SPA.Value=3  
    SPA.VString=Chr$(13)+Chr$(23)+Chr$(23)+Chr$(45)+Chr$(42)+Chr$(19)+Chr$(44)  
    SPA.Value=3  
    ooPIC.Delay = 100
  Loop
End Sub
Back to top of pageConnections:
The oSP0256 Object uses one I/O Group and two I/O Lines.  The SP0256 requires 5 volts to operate.

Back to top of page Related Items:

 The following table lists objects with related functions
 ObjectDescriptionA1A2B1B2C1
oSoundginControls a Soundgin Sound Effects Engine / Voice Synthesizer chip.xxx
Back to top of page Version History and Bug List:
 Firmware Ver B2: Introduced.

Bugs: No known bugs.


 

ooPIC Compiler Ver 6.0 (c) Copyright 1997 - 2007 Savage Innovations, LLC.