It's probably getting out of sync with the data.
And there's no way to re-sync it.
Try it like this ...Code:hserin [wait($90), pitch, streng]
It's probably getting out of sync with the data.
And there's no way to re-sync it.
Try it like this ...Code:hserin [wait($90), pitch, streng]
DT
Thank you Darrel,
Actually, I've been trying to wait for a $90 byte too, but in this case, it seems that the pic doesn't see the start byte at all (or only from time to time)
Do you see any other way to code a more reliable "midi receive" routine ? Has it something to do with buffering the incoming datas ?
Thanks again for your help
Nicolas
You mentioned before that you saw Tom Igoe's MIDI page.
Are you using the Opto-Isolator on the input? Is it a 6N138?
Or is it converting the current loop to voltage another way?
<br>
DT
Yes I've been using an opto-isolator, but it was a 6n137. Does it make any difference with the 138 ?
It may.
The 137 has a higher input current requirement than the 138.
And I think MIDI uses a 5mA current loop for it's signal, which is right at the absolute minimum specified for the 137.
It may not be creating a good signal on the other side.
Can't say for sure though.
<br>
DT
Ok, thanks to you I found the problem ! The 6n138 and 137 don't have the same wiring . I got it working with by correcting the connection of the opto isolator
(basically, it's pin 5 to ground, 6 to Rx , 1,5kO res between 6and 7, and 7,8 to +5Vcc, the other pins are the same as 138)
I still have speed issues. The datas are received, but at a very slow pace(about a good midi pack by second). Do you see any way to improve the speed, to get a more "real-time" application ?
Bookmarks