I would like to control the JUNO60 in MIDI
This old syntheziser use DCB protocol
i connect the arduino like this
-DCB Tx Data -----> Arduino Rx
-DCB ground ------> Arduion Ground
I use this program to read the data who send the juno 60
int Led = 13;
int data = 0;
int count=0;
///////////////////////////////////////////////////////////////
//Initialisation de la sorite de la Led et du port Rx en Midi//
void setup() {
}
////////////////////////////////////////////////////////////////
///////////////////////debut de la boucle///////////////////////
void loop() {
Serial.begin(31250);
delay(100);
if(Serial.available() > 0){// un info est elle presente en Rx
data = Serial.read();// enregistrer cette info dans la variable Data
Serial.begin (9600);
Serial.print (data, HEX);
Serial.println (" ");
count ++;
if (count == 7){
Serial.print("/n");
count =0;
}
}
}
I don't understand this data because at the beginning the data seem to ok and when i try to push a key the datra change and never be the same as the beginning
Is there anybody who are "friendly" with the type of protocol or maybe i dont interface it correctly
I don't know the DVB protocol but are you sure about your baud rate ?
Because usually this kind of bad data can comes from incorrect baud rate
Edit : after checking the wikipedia page you added, it seems that the protocol have 2 stop bit.
"LSB first, 8 data bits, 2 stop bits, odd parity, and a Baud rate of 31.25kHz."
This could be the cause of your data errors
There is a post on midibox forum about this protocol (but no solution) you can maybe find useful info :
I learned a little bit more of the UART protocol
and it work like that.
A byte is composing with:
-first one start bit = 0
-after Data bits between 5 and 9
-then a parity bit
-finaly one stop bit = 1
the different between the DCB protocol and UART is that the start in DCB is 1 and stop Bit is 0
Do you think it's possible to change this on the Arduino UART.
But how he can find 84 microseconds to generate 9600baud
f=1/T F= 1/0,000084 = 11905 hz approximately
How can i find the right frequency to generate 31250baud ?
Maybe he add the time of each action on his fonction , i'm right??
Now, with your help i know what i need to do to send data in my JUNO60
Arduino must generate a clock at 31250hz on one PIN
a second PIN must send DATA (Start bit, Data Bits,Parity Bit and Stop Bit) in Serial at the same frequency and synhcro with the clock
And a third PIN to latch the hardwareflow control.
Then i could use this part of code to generate the right "polarity" of my bit