I've been trying to set up communication through midi.
Sending from the E-block is no problem. I'v used the MMM delivered programs.
I've also created a midi clock signal sending 24 clocks/sec.
I can read these sigals out with the MIDI-OX console on my PC.
The timestamps form the CLK signal match perfectly with the sent data.
On the other hand when I try to receive midi code from MIDI-OX and display it on the LCD E-block,
I get crappy stuff, or nothing at all. I've used every MMM program : Midi_monitor, Slave, Slave_HW and Midi_rx.
I adapted parameters in the programs, I've been tweaking the delays without any change in the received data.
The Status Byte is nearly always 32. The same message appears different every time it is sent. I used 2 diffent PIC types...
Kind of running out of ideas here...
I didn't tweak the CPU clk, for the sent data is clocked in well and Timestamps match perfectly.
Can't find extended CPU info in data sheets??
Other known issues, possible solutions?
Help please!
Tx.
First of all you have the Use Extended CPU config bit enabled. This is known to cause problems so I would recommend that you disable this option.
Secondly there are a couple of defines that control the baud rate of the bit banged MIDI signal.
For a clock speed of 19660800Hz
//MIDI Bit and Half Bit Delays
#define MIDI_TX32_US 41
#define MIDI_RX16_US 20
And for a clock speed of 12000000Hz.
//MIDI Bit and Half Bit Delays
#define MIDI_TX32_US 20
#define MIDI_RX16_US 9
If you select the MIDI component on the panel then you can right click it and select custom code. Then select the GetDefines section and click Edit.
Once in here you can then change the values assigned to the baud rate to see if you can tweak it slightly to make it work more reliably.
//MIDI Bit and Half Bit Delays
#define MIDI_TX32_US %e
#define MIDI_RX16_US %f
Eg change to
//MIDI Bit and Half Bit Delays
#define MIDI_TX32_US 12
#define MIDI_RX16_US 5
As the signal is bit banged it is based on delays which are based on the crystal frequency. We have a calculation which generates the delay values but sometimes tweaking the values slightly allows for a more reliable connection.
If you have an oscilloscope then you can test the data. The baud rate should be as near to 31250 bits per second as you can get it.
Hope this helps.