Help converting PBASIC program to Assembly or SX/B (Midi Time Code Project)
Hello everyone,
I have worked on a few projects over the past few years, none of which have ever been completed successfully. BUT, I am feeling good about this one. It has promise.
·
I will try to describe what exactly it is that I would like to do. First of all, I will explain some about MTC (Midi Time Code). MTC is the MIDI version of the SMPTE time code. It is sent using a midi cable the same way note on and note off commands are sent, which you·are probably·familiar with if you read any of the sample·programs that deal with MIDI. I want to read these signals (which all begin with $F1) and convert them to Hours, Minutes, Seconds, and Frames and then display them on a LED 7-segment display using the MAX7219. A little more is explained in the BSII program, so to see what the data actually looks like take a look at the comments. It is pretty straight forward. The only problem is the speed, which is quite important in this type of application.
·
So far, I have a good BSII program, which doesn't work at all, probably because I have not tested it fully, but more importantly because according to my calculations, and hopefully someone will confirm this, the BSII takes way to long to run, and misses all the info it needs. I calculated that it takes about 26 ms to run case 0 and 4, when, in reality, it only has about 4 and a half ms to do it (before the next bit of info comes along). (It does work if I simply send it the information it should be getting in the debug window) So, I must use my SX28 which I am sure is fast enough. But I do not know how to convert it from PBASIC to Assembly, and I have tried a simple SX/B program which initializes the MAX7219, but·it isn’t working either. So, if anyone would like to help me convert this PBASIC program into either assembly, or SX/B, I would love that. Of course this is asking a lot, but if anyone has any free time they are willing to spend looking at an interesting program, this is a great opportunity. I think the SX/B program should work, but it isn’t. And that is where I am stuck at the moment. I have attached the files below.
·
I certainly have not given up yet, and will continue to update this with progress I make, and will hopefully move the whole thing to the "projects" section once it is complete.
·
Thank you very much,
Marcus Garfunkel
I have worked on a few projects over the past few years, none of which have ever been completed successfully. BUT, I am feeling good about this one. It has promise.
·
I will try to describe what exactly it is that I would like to do. First of all, I will explain some about MTC (Midi Time Code). MTC is the MIDI version of the SMPTE time code. It is sent using a midi cable the same way note on and note off commands are sent, which you·are probably·familiar with if you read any of the sample·programs that deal with MIDI. I want to read these signals (which all begin with $F1) and convert them to Hours, Minutes, Seconds, and Frames and then display them on a LED 7-segment display using the MAX7219. A little more is explained in the BSII program, so to see what the data actually looks like take a look at the comments. It is pretty straight forward. The only problem is the speed, which is quite important in this type of application.
·
So far, I have a good BSII program, which doesn't work at all, probably because I have not tested it fully, but more importantly because according to my calculations, and hopefully someone will confirm this, the BSII takes way to long to run, and misses all the info it needs. I calculated that it takes about 26 ms to run case 0 and 4, when, in reality, it only has about 4 and a half ms to do it (before the next bit of info comes along). (It does work if I simply send it the information it should be getting in the debug window) So, I must use my SX28 which I am sure is fast enough. But I do not know how to convert it from PBASIC to Assembly, and I have tried a simple SX/B program which initializes the MAX7219, but·it isn’t working either. So, if anyone would like to help me convert this PBASIC program into either assembly, or SX/B, I would love that. Of course this is asking a lot, but if anyone has any free time they are willing to spend looking at an interesting program, this is a great opportunity. I think the SX/B program should work, but it isn’t. And that is where I am stuck at the moment. I have attached the files below.
·
I certainly have not given up yet, and will continue to update this with progress I make, and will hopefully move the whole thing to the "projects" section once it is complete.
·
Thank you very much,
Marcus Garfunkel
Comments
-Marcus
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Whenever I try to assemble the file, SXB.exe crashses and doesn't seem to finish writing the Source file. Then·a few·errors come up. The original MIDI_CONTROL file assembled fine, so I know it is something that I have done. I deleted much of the code that I wasn't needing, so I might have done something wrong, but there are no "errors" becuase the compiler crashes before finishing the SRC file. Anyone know what could be wrong?
-Marcus Garfunkel
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
was not valid I guess. I changed it to
and now it works
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax