Shop OBEX P1 Docs P2 Docs Learn Events
SPO256 Stamp code — Parallax Forums

SPO256 Stamp code

ArchiverArchiver Posts: 46,084
edited 2001-04-12 04:41 in General Discussion
Here is the SPO256 code.
Hope you like it.

Bandit


'====================================
' Program to operate SPO256A-AL2
'
' By Bob Schumann - December 1999
' Sample Bandit
'====================================

'====================================
' The connections
'
' Stamp ports 0-5 to SPO256 a0-a5
' Stamp port 8 to SPO256 LRQ
' Stamp port 9 to SPO256 ALD
'====================================

'====================================
'Allophone set addresses
'====================================
PA1 CON 0 'PAUSE 10MS
PA2 CON 1 'PAUSE 30MS
PA3 CON 2 'PAUSE 50MS
PA4 CON 3 'PAUSE 100MS
PA5 CON 4 'PAUSE 200MS
OY CON 5 'Boy
AY CON 6 'Sky
EH CON 7 'End
KK3 CON 8 'Comb
PP CON 9 'Pow
JH CON 10 'Dodge
NN1 CON 11 'Thin
IH CON 12 'Sit
TT2 CON 13 'To
RR1 CON 14 'Rural
AX CON 15 'Succeed
MM CON 16 'Milk
TT1 CON 17 'Part
DH1 CON 18 'They
IY CON 19 'See
EY CON 20 'Beige
DD1 CON 21 'Could
UW1 CON 22 'To
AO CON 23 'Aught
AA CON 24 'Hot
YY2 CON 25 'Yes
AE CON 26 'Hat
HH1 CON 27 'He
BB1 CON 28 'Business
TH CON 29 'Thin
UH CON 30 'Book
UW2 CON 31 'Food
AW CON 32 'Out
DD2 CON 33 'Do
GG3 CON 34 'Wig
VV CON 35 'Vest
GG1 CON 36 'Got
SH CON 37 'Ship
ZH CON 38 'Azure
RR2 CON 39 'Brian
FF CON 40 'Food
KK2 CON 41 'Sky
KK1 CON 42 'Can't
ZZ CON 43 'Zoo
NG CON 44 'Anchor
LL CON 45 'Lake
WW CON 46 'Wool
XR CON 47 'Repair
WH CON 48 'Wig
YY1 CON 49 'Yes
CH CON 50 'Church
ER1 CON 51 'Fir 160MS
ER2 CON 52 'Fir 300MS
OW CON 53 'Beau
DH2 CON 54 'They
SS CON 55 'Vest
NN2 CON 56 'No
HH2 CON 57 'Hoe
OR1 CON 58 'Store
AR CON 59 'Alarm
YR CON 60 'Clear
GG2 CON 61 'Guest
EL CON 62 'Saddle
BB2 CON 63 'Business
'====================================

'====================================
' Program main
'====================================

main:

'Set ports 0-5 as outputs
DIRL = %00111111

'Set port 8 as input
DIR8 = 0

'Set port 9 as outut
DIR9 = 1

'Make ports 0 - 7 all lows
OUTL=0

'Index into data
B2=0

'Pause 3 seconds
PAUSE 3000

'Play message
GOSUB play

'Set address lines to zero
OUTL = 0

'End with low power consumption
END


'====================================
' Subroutines
'====================================

'Subroutine that plays allaphones
play:
'Make sure speech chip is not currently speaking
IF IN8 = 1 THEN play

'Read in next allaphone
READ B2,B3

'64 indicates end of message
IF B3=64 THEN play_term

'Set allaphone address line on speech chip
OUTL = B3

'Strobe address load on speech chip
PULSOUT 9,3

'Data index ++
B2=B2+1

'Loop
GOTO play
play_term:
RETURN

'====================================
' Data
'====================================

'Message allaphone data
DATA TH,IH,SS,SS,3 'This
DATA IH,ZZ,3 'is
DATA AE,NN1,3 'an
DATA IY,MM,ER2,1,JH,EH,NN2,SS,IY,3 'emergency
DATA BB1,RR2,AO,1,DD2,1,KK1,AE,SS,3,TT1,3 'broadcast
DATA MM,EH,SS,SS,EH,2,JH,3 'message
DATA FF,FF,RR1,AX,MM,3 'from
DATA DH2,AX,AX,3 'the
DATA FF,YY1,UW2,1,CH,ER2,3 'future
DATA 4,4
DATA WH,AX,2,TT2,3 'What
DATA DD2,UW2,3 'do
DATA YY2,UW2,3 'you
DATA WW,AX,NN1,2,TT2,2 'want
DATA AX,SS,SS,2 'us
DATA TT2,UW2,2 'to
DATA DD2,UW2,2 'do
DATA WH,IH,TH,2 'with
DATA AO,AO,LL,LL,2 'all
DATA AO,AO,VV,2 'of
DATA TH,IY,ZZ,2 'these
DATA KK3,RR2,AY,OW,1,JH,EH,NN2,IH,2,KK2,LL,IY,2 'cryogenically
DATA FF,RR2,OW,ZZ,EH,NN2,2 'frozen
DATA HH1,EH,EH,2,DD2,SS,2 'heads
DATA 4
DATA 64

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2001-04-12 04:41
    Thanks!

    Original Message
    From: "Sample Bandit" <tesla@i...>
    To: <basicstamps@yahoogroups.com>
    Sent: Wednesday, April 11, 2001 5:05 AM
    Subject: [noparse][[/noparse]basicstamps] SPO256 Stamp code


    >
    > Here is the SPO256 code.
    > Hope you like it.
    >
    > Bandit
    >
    >
    > '====================================
Sign In or Register to comment.