Menu

Play RTTL, cant get to work?

Help
Ryan
2016-07-13
2016-07-15
  • Ryan

    Ryan - 2016-07-13

    Here what i have, wont compile unless i add extra "t" to the rttl but then its no longer highlighted in blue, and doesnt play a thing?

    #chip 16F688, 8 'mhz
    #config INTRC_OSC_NOCLKOUT, MCLRE=off, WDT=off
    
    dir porta.0 in  '1 ir sensor
    dir porta.1 in  '2 ir sensor
    dir porta.2 in  '3 ir sensor
    dir portc.0 in  '4 ir sensor
    dir portc.1 in  '5 ir sensor
    dir porta.3 in  '6 ir sensor
    dir portc.3 out 'right drive
    dir portc.4 out 'right drive
    dir portc.5 out 'brushes
    dir porta.4 out 'left drive
    dir porta.5 out 'left drive
    dir portc.2 out 'audio
    
    #include <songplay.h>
    #define SoundOut PORTC.2
    Dir SoundOut Out
    Dim SoundPlayRTTLDataString as String
    
    
    wait 2 s
    
    main:
    SoundPlayRTTLDataString ="LedZeppel:d=4,o=6,b=80:8g,16p,8f_,16p,8f,16p,8e,16p,8d,8a5,8c,16p,8b5,16p,a_5,8a5,16f5,16e5,16d5,8p,16p,16a_5,16a_5,16a_5,8p,16p,16b5,16b5,16b5,8p,16p,16b5,16b5,16b5,8p,16p,16c,16c,16c,8p,16p,16c,16c,16c"
    PlayRTTL(SoundPlayRTTLDataString)
    end
    
     

    Last edit: Anobium 2016-07-13
  • Anobium

    Anobium - 2016-07-13

    Thanks. Great spot.

    Something is not correct and it has been like this for a long time - I have reviewed the source code.

    Give us a few days to sort.

     
  • Anobium

    Anobium - 2016-07-14

    PlayRTTTL is the correct command. The Help file is correct with respect to information... we just got a letter missing!

    The documentation and the IDE helpers are incorrect. This will be updated in the next release. Been wrong for a long time - thank you for spotting. This means the IDE blue will not highlight the correct command. The next release will fix this.

    See the attachments. These examples work. Yes... I just tried and the sound squeaked out! Yuk. I will include in the next release.

    I used the Chipino Demo-Shield for these tests, see http://www.elproducts.com/demo-shield.html as this also shows the schematic that you need to use.

    For more RTTTL sounds see,

    http://mines.lumpylumpy.com/Electronics/Computers/Software/Cpp/MFC/RingTones.RTTTL

    Anobium

     
  • Chris Roper

    Chris Roper - 2016-07-14

    Just tried this on the Xpress Board and it works perfectly, a very tinny sound but recognisable.

    The only changes are the
    #chip 16f1938

    to read
    #chip 16f18855

    and
    #define SWX PORTb.1

    to read
    #define SWX PORTa.5

    and plug the buzzer into the header socket marked INT (RC2).

    Cheers
    Chris

     

    Last edit: Chris Roper 2016-07-14
    • Chris Roper

      Chris Roper - 2016-07-14

      If you would like to modify any of the tunes or create your own tunes here is the documentation:
      https://en.wikipedia.org/wiki/Ring_Tone_Transfer_Language

       
  • Anobium

    Anobium - 2016-07-14

    You seen the 2016 GhostBuster Movie? That is tinny! It is SO poor!!!!

    Anyone else seen it?

     
    • Chris Roper

      Chris Roper - 2016-07-14

      "Anyone else seen it?"

      Not yet, I saw the trailer and decided I will wait untill it is out on DVD.

      I generaly avoid anything that is marketed as 3D as they generaly hope the WoW factor of 3D will cover up for bad production values and plot holes.

       

      Last edit: Chris Roper 2016-07-14
  • Ryan

    Ryan - 2016-07-14

    I get a message saying the string is too large, im guessing the 16f690 doesnt have enough memory to run it

     
  • Anobium

    Anobium - 2016-07-15

    If you try a smaller string does it work?

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.