Sign in

username:

password:



Not a member?

Search basicx



Search tips

Subscribe to basicx



basicx by Keywords

Accelerometer | ADC | ADXL | Adxl20 | AVR | BasicStamp | BX-35 | BX28 | BX35 | COM3 | Compiler | Downloader | EEPROM | Electromagnet | GetADC | GP2D1 | GPS | I2C | IDE | Keypad | LCD | LCD+ | MIDI | Motors | Multitasking | Netmedia | Networking | PCB | PID | PlaySound | PWM | Relays | RTC | Servo | ShiftOut | SitePlayer | SPI | Stack | Timer | USB

Ads

Discussion Groups

Discussion Groups | BasicX | PlaySound and the BX-35

Discussion forum for the BasicX family of microcontroller chips.

PlaySound and the BX-35 - cowenowner - Sep 30 19:39:00 2004

I have not had much success with PlaySound on my BX-35.

I have written a small basicx program to play a sound stored in the
eeprom from bytes 20000 to 30000...

Option Explicit

Public Sub Main()
Call FreqOut(40,4000,4000,1.0)
delay 0.5
Call PlaySound(40,20000, 10000,5000,10)
Call FreqOut(40,2000,2000,1.0)

'Call playSound(40,400,10300,2000,0)
'
End Sub

I inserted the sound values by appending binary data to the .bxb file.

When I run the program, the BX-35 just resets after the first tone and
delay, so what you get is a tone every .5 seconds. If it worked, I
should get 20 secods of music (5000 sample rate, 10000 samples, 10
repeats = 20 seconds). I just don't understand why this does not
work.

To check things, I downloaded the SoundFile demo project entitled
"Using BasicX Block Data Objects with PlaySound" from BasicX.com. The
BX also reset upon reaching the PlaySound command in this demo
(everything up to the playsound command worked fine). My first guess
is that there is a problem with the BX-35 and playsound. Perhaps with
the external EEPROM??

Does anyone have any other theories or experience?

Thanks,

Stephen





(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )


Re: PlaySound and the BX-35 - cowenowner - Oct 16 19:45:00 2004


Replying to my own message...

I have since tried the same code on a BX-24 and it worked just fine. I
have tested with another BX-35 and it also failed. The conclusion is
that something is up with PlaySound and the BX-35 and/or the BX-35
development station. No word yet from Netmedia on this though.

Stephen
--- In , "cowenowner" <cowenowner@y...> wrote:
> I have not had much success with PlaySound on my BX-35.
>
> I have written a small basicx program to play a sound stored in the
> eeprom from bytes 20000 to 30000...
>
> Option Explicit
>
> Public Sub Main()
> Call FreqOut(40,4000,4000,1.0)
> delay 0.5
> Call PlaySound(40,20000, 10000,5000,10)
> Call FreqOut(40,2000,2000,1.0)
>
> 'Call playSound(40,400,10300,2000,0)
> '
> End Sub
>
> I inserted the sound values by appending binary data to the .bxb file.
>
> When I run the program, the BX-35 just resets after the first tone and
> delay, so what you get is a tone every .5 seconds. If it worked, I
> should get 20 secods of music (5000 sample rate, 10000 samples, 10
> repeats = 20 seconds). I just don't understand why this does not
> work.
>
> To check things, I downloaded the SoundFile demo project entitled
> "Using BasicX Block Data Objects with PlaySound" from BasicX.com. The
> BX also reset upon reaching the PlaySound command in this demo
> (everything up to the playsound command worked fine). My first guess
> is that there is a problem with the BX-35 and playsound. Perhaps with
> the external EEPROM??
>
> Does anyone have any other theories or experience?
>
> Thanks,
>
> Stephen





(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )