Shop OBEX P1 Docs P2 Docs Learn Events
BS2 Baud Rate for 'MP3 Trigger' — Parallax Forums

BS2 Baud Rate for 'MP3 Trigger'

Tim-MTim-M Posts: 522
edited 2009-12-01 06:49 in BASIC Stamp
Hi Group,

I'm considering using the 'MP3 Trigger' embedded player by Jamie Robertson (sold through SparkFun and others) in a BS2 based project.

You can find that product here:
http://www.sparkfun.com/commerce/product_info.php?products_id=9356

The MP3 Trigger uses full duplex, 8-bit serial communication which is set at 38.4K baud by default. From what I understand, the high speed communication is necessary for smooth real-time volume control, which I need for this project as well. Before I commit to using a BS2 at the core, I'd like to confirm that I'm reading the editor help file correctly... that the BS2 is indeed capable of the 38.4K serial communication speed. My projects to date have never required more that 9600 baud.

Thanks for backing me up,

Tim

Post Edited (Tim-M) : 12/1/2009 5:12:35 AM GMT

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-12-01 05:50
    The BS2 is not capable of handling 38.4KB serial communications. The faster Stamps like the BS2px might be able to handle it, but not full duplex. None of the Stamps really do full duplex because the Stamps are single threaded and can only transmit or receive at any one time, not both. Reception is not buffered. Sometimes you can get away with this by using handshaking, but sometimes that's just not enough and reception at 38.4KB is often dicey at best. The BS2 can only do at most 9600 Baud reception and not reliably at that, particularly if you're using the formatters.

    An SX or a Propeller could handle this task easily.
  • Tim-MTim-M Posts: 522
    edited 2009-12-01 06:05
    Thank you for your time and feedback Mike. I should have said that I don't need full duplex communication, but rather just to send commands out at 38.4K... the only communication coming back to the uC would be a couple of 'I'm finished playing the track' bits, if I were to monitor for them. Can I squeak by with one of the Basic Stamp series this way, or is that still pushing the envelope too far? I understand what you're saying about using a Propeller or SX, but I have yet to work with either of those products and would like to stay with what I know for now unless the change is necessary.

    Tim
  • Mike GreenMike Green Posts: 23,101
    edited 2009-12-01 06:31
    The BS2sx or any of the "p" series (BS2p / BS2pe / BS2px) should be able to transmit at 38.4KB and may be able to receive at 38.4KB if you're careful to avoid the use of the formatters (like DEC / HEX / BIN / etc.) Handshaking may also slow down the SERIN / SEROUT statements too much. Don't count on being able to receive reliably at 38.4KB.
  • Tim-MTim-M Posts: 522
    edited 2009-12-01 06:49
    Mike, Thanks so much for your help. Sounds like this project should be the reason to get started with the Propeller.

    Tim
Sign In or Register to comment.