Fast serial comms for an MP3 player

benryves

Senior Member
Somebody wanted to control a particular MP3 player with their calculator, so I suggested the PICAXE series.

The PICAXE system would be acting as a bridge between the calculator and the MP3 player, converting the MP3 player's serial comms to the calculator's native byte transfer protocol (the calculator is a programmable TI-83 Plus).

The MP3 player is this one - http://www.roguerobotics.com/products/electronics/ump3

According to the datasheet, it can be controlled using a serial connection at 9600 baud. The 08M (which would be used to communicate with the calculator) can (as far as I'm aware) provide this output by setting the frequency to 8MHz and using SerTxd.

Serial input (to receive directory listings and other status reports) would need to be handled by another chip. I was thinking that an 18X could buffer the response and send it slowly out to the connected 08M for processing by the calculator (the '>' prompt sent by the MP3 player would seem a good place to stop receiving input).

Receiving variable quantities of serial input data seems tricky and unreliable when a stream of bytes is sent in rapid succession. Does anyone have any recommendations, or would it be better to find some other external serial buffering component (if such a thing exists)?
 

hippy

Ex-Staff (retired)
The 28X1/40X1 ( available 1st May 2007 ) will handle high-speed, back-to-back data transmissions and would probably be the best PICAXE to use. That should be able to handle comms in both directions by itself, so hopefully won't be much more expensive than an 18X+08M.
 

benryves

Senior Member
Thank you for the information. My only real concern is dropping bytes between subsequent SERIN commands. Sending a byte to the connected calculator between receiving data from the MP3 player would be much too slow.

The only serial input change I can see is that SERRXD has been added to the BASIC manuals for the 28X1/X2 and 40X1/X2 parts - is this the new functionality you're referring to? (Or am I barking up the wrong tree?)

Thanks once again!
 

melazarus

Member
If you use the 28X1 you can use the scratchpad memory (128 bytes I think) as a buffer for serin. This way the PICAXE will handle incomming serial traffic and buffer it into the scratchpad.

I'm not sure if the 28X1 can do this also when it is using the serout command.
 

Technical

Technical Support
Staff member
The 28X1 would be your best bet and would do what you want.

However you might also want to consider the VMusic2 MP3 device.

<A href='http://194.201.138.187/epages/Store.storefront/?ObjectPath=/Shops/Store.TechSupplies/Products/USB030' Target=_Blank>External Web Link</a>

It's less than half the price of the MP3 unit you describe, and could also be used with an SPI (or serial) connection to the 28X1. The advantge of SPI over serial is the PICAXE controls the whole timing (ie it generates the SPI clock pulses), so bytes can never get lost.
 
Top