Vmusic2 Messages
Hi all !
I'm still playing with a vmusic2 module to get a full and improved mp3 player, well, although I've posted a code for an mp3 player, I found too dificult to manage the vmusic messages.
I've tried looking at the Mike's "Prism project" but I can't really get good ideas from that code (seems to be more complicated for me).
My original code manage the vmusic messages in a repeat loop, waiting for a byte recieved through serial port, .......that works, but I can't add more messages in the display at any time, because the rx loop is waiting for the vmusic messages.... (I hope you understand me ...what I mean).
I'm trying to controll now the vmusic using the handshake signals....to see if it lets me to modify my code and take more control of the data recieved (or the eactly time of it)...but I can see, that the "RTS out" in the vmusic, never changes the logic state, and also I can't found info about this, in all the vmusic & firmaware documents....
I suppose that Mike is the most experience with this module, but if somebody more have more suggests or experiences, I will be thanks this.
The exactly question is: How to ??? manage the vmusic messages and How to ?? use correctly the handshake signals.
Thanks all in advance !!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Regards.
Alberto.
I'm still playing with a vmusic2 module to get a full and improved mp3 player, well, although I've posted a code for an mp3 player, I found too dificult to manage the vmusic messages.
I've tried looking at the Mike's "Prism project" but I can't really get good ideas from that code (seems to be more complicated for me).
My original code manage the vmusic messages in a repeat loop, waiting for a byte recieved through serial port, .......that works, but I can't add more messages in the display at any time, because the rx loop is waiting for the vmusic messages.... (I hope you understand me ...what I mean).
I'm trying to controll now the vmusic using the handshake signals....to see if it lets me to modify my code and take more control of the data recieved (or the eactly time of it)...but I can see, that the "RTS out" in the vmusic, never changes the logic state, and also I can't found info about this, in all the vmusic & firmaware documents....
I suppose that Mike is the most experience with this module, but if somebody more have more suggests or experiences, I will be thanks this.
The exactly question is: How to ??? manage the vmusic messages and How to ?? use correctly the handshake signals.
Thanks all in advance !!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Regards.
Alberto.
Comments
Yes, the Prism project routines are fairly complicated because they are designed for two VMusic2 modules operating simultaneously with a shared status display. Try stripping out all of the code for the parts you don't need. You need the modified FullDuplexSerial object and a simplified VMusic2 object. I didn't find a need for the handshake lines. The RTS line is only to stop the Propeller from sending to a busy VMusic2. The FullDuplexSerial routines are fast and buffered. I increased the buffer sizes to 64 bytes which takes care of the largest command and status response I expected.
Look particularly at playTheFile and the routines it calls. You'll see that, after sending a command to the VMusic2, it receives all characters until a timeout occurs, then looks for a match at the end of the buffered text. Most responses end with a specific prompt sequence and that's what is looked for.
I will try all you commented .
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Regards.
Alberto.
I've stripped out most of the unneeded methods and modified a couple of them.
I haven't tested it, but look through it. It should be much more understandable.
I include the program here. It doesn't work to try to attach the file:
Your code was a big help for me, to understand more the vmusic !!
I also discovered that the RTS line only activates when you send "Disk" commands... but not when vmusic ones are sent.
Anyway I didn't use the handshaking.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Regards.
Alberto.