Jump to content



Photo
- - - - -

Proof Of Concept - Audioplayer On Fx98650g Sd


  • Please log in to reply
6 replies to this topic

#1 Martin

Martin

    Casio Freak

  • Members
  • PipPipPipPip
  • 121 posts
  • Gender:Male
  • Location:Praha
  • Interests:asm on cfx9850

  • Calculators:
    fx82l
    fx7700GB
    cfx9850G
    TI92
    fx9860G SD
    Rheinmetall KEL IIc
    H. W. Ebmeyer - Tarema
    fx cg20

Posted 18 June 2009 - 03:19 PM

I have idea about the possibility to play sound on fx9860 G SD and I need your opinion.
1. Audio files will be stored on the SD card as the internal flash is not large enough.
2. The format will be mono, 4bit per sample, 22 kHz, but may be better. I am not sure if the CPU (at max speed) is able to decode MP3, but it is too early for this question :-)
3. As an output device ("sound card") we use serial port, it will work as 1 bit DAC. We need to output data in very high speed ~ Mbit/s
4. We fill serial FIFO by DMA.
5. The main routine will read data from SD card in suitable sized data chunks and convert it.
6. Simple stereo headphones with 2.5 stereo jack would play (of course only 1 headphone would play), but simple low pass filter is preferred.

As I wrote above I need your opinion:
a. Do we want it? Simple cheap MP3 player produces much better sound.
b. Is it possible to put together?
b1. What is the max data rate of the sio ?
b2. What is the read speed of the SD card. We need 25 ~ 50KB/s
b3. Can we use DMA for sio in addon app ?
c. What important I have forgotten ?

Please excuse me if this topic was already discussed elsewhere.

#2 alias4399

alias4399

    Casio Freak

  • Members
  • PipPipPipPip
  • 180 posts
  • Location:Impossible to say.. Its not like this is a constant!

  • Calculators:
    CFX 9850GB Plus
    FX 9860G

Posted 18 June 2009 - 04:21 PM

This would create an EXPLOSION if you could play sound from the calculator. I do not think this has been discussed before. If you could pull this off, Martin.. it would be incredible. :D

#3 ECE

ECE

    Casio Freak

  • Members
  • PipPipPipPip
  • 152 posts
  • Gender:Not Telling
  • Location:USA

  • Calculators:
    ClassPad300 Plus o.s3.06.1000
    fx-CG20 o.s1.04
    fx9860GII SD o.s2.00
    fx9860G Slim o.s1.10
    fx9860GSD o.s2.01 (GII hacked)
    Algebra FX2.0 Plus
    CFX9850GBplus
    fx5800p
    fx3650p
    fx570ES Plus
    EA-200 Casio Data Analyzer

Posted 18 June 2009 - 06:04 PM

6. Simple stereo headphones with 2.5 stereo jack would play (of course only 1 headphone would play), but simple low pass filter is preferred.


The serial port sends packets in certain Casio protocol in a Digital format (square waves). How are you going to send an analog sound wave directly to the speaker?

Regards.

#4 Distortion

Distortion

    Newbie

  • Members
  • Pip
  • 23 posts

  • Calculators:
    fx-9860G

Posted 18 June 2009 - 06:40 PM

I believe I accidentally stumbled upon a thread where kucalc was talking about playing wav files on a calculator.
Of course, I can't find it anymore...

IIRC the project was discontinued without a given reason.

#5 noname11

noname11

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 314 posts
  • Gender:Not Telling

Posted 18 June 2009 - 10:49 PM

This was already done for the AFX series of calculators:
Marco's homepage: http://www.pageofmarco.de/sound.php3
UCF discussion: http://www.casiocalc...?showtopic=2015

#6 Martin

Martin

    Casio Freak

  • Members
  • PipPipPipPip
  • 121 posts
  • Gender:Male
  • Location:Praha
  • Interests:asm on cfx9850

  • Calculators:
    fx82l
    fx7700GB
    cfx9850G
    TI92
    fx9860G SD
    Rheinmetall KEL IIc
    H. W. Ebmeyer - Tarema
    fx cg20

Posted 19 June 2009 - 09:44 AM

This was already done for the AFX series of calculators:...


Yes, but it is something like midi player.
I would like to create something like wav player.

#7 Martin

Martin

    Casio Freak

  • Members
  • PipPipPipPip
  • 121 posts
  • Gender:Male
  • Location:Praha
  • Interests:asm on cfx9850

  • Calculators:
    fx82l
    fx7700GB
    cfx9850G
    TI92
    fx9860G SD
    Rheinmetall KEL IIc
    H. W. Ebmeyer - Tarema
    fx cg20

Posted 19 June 2009 - 10:03 AM

I have created simple demo, which can demonstrate quality of the playback.
It is very simple quick and dirty program for windows. To try it you need:
1. COM->jack converter, ugly schematics is at http://www.rkk.cz/~m...0snd/scheme.gif.
2. Sample audio - convert some mp3 file to wav format, mono, 8bit per sample, 44100 samples/second.
I used disk writer plugin in winamp, screenshot of settings is at http://www.rkk.cz/~m...0snd/format.gif
3. Compile program from http://www.rkk.cz/~m...0snd/comsnd.cpp,
change the #defines for com name, speed and audio file as you need.

Standard PC serial ports work at maximum speed 115200 which is already set in my program. If you have something better - for example many USB->COM cables or PCI card with additional COM ports are able to operate at 230400 (use #define COM_SPEED COM_SPEED_DOUBLE) or at 460800 (use #define COM_SPEED COM_SPEED_QUAD),try it.
Higher speed means better quality, which is very terrible for standard bit rate 115200 because you can hear byte frequency here (speed/10~ 11 kHz).
Playing modes:
at 115200: 11520 samples/second, 3 bit
at 230400: 23040 samples/second, 3 bit
at 460800: 23040 samples/second, 4 bit

Please use cheap low quality headphones at least for the first try :-)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users