Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

SysEx through midi question

Status
Not open for further replies.

Jman 31

Member level 2
Joined
Sep 18, 2009
Messages
49
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,675
Hey guys,

We (my partner and I) have written a small computer application for sending and receiving info via System Exclusive (SysEx) through a midi to usb converter on my midi LED project. We can transfer info to the atmega128 through the midi connection but since there is no TX connection we can not pull info off of the chip.

Ed (programmer/partner) says that it works if he shorts the RX and TX pins, but I can't imagine that that is a viable way to accomplish this. Is there a way to do this and protect the pins? A diode maybe?

Any thoughts would be greatly appreciated!

Jman

MKProSysExIssues.jpg
 

Here in red is my thought on a quick and dirty way to get the midi out. Does this seem like it would be an OK option?


MKProSysExIssuesRepairidea-1.jpg
 

I think you can do it using 3state buffers like 74HCT244 but you need a couple of mcu pins to control it.
You can also use analog switches lie CD4066 http://members.shaw.ca/roma/4066.pdf

I don't think the resistor solution will work

Alex
 

I don't think the resistor solution will work

Alex

Thanks Alex! When you say you don't think it will work, do you mean it will cause a problem electronically? Or do mean it just won't function as we want it to? This will not be a constant communication, it will only be there read the settings off of the chip seldomly.
 

the two resistors create a voltage divider, I'm not sure about the state of Tx while you are using Rx but I think the midi signal will be either 0-2.5v or 2.5v-5v depending on the state of Tx.
Also when you are using Tx you will have the output of the Hex Schmitt Trigger Inverters having 0 or 5v and you will also have 0-2.5v or 2.5v-5v

Alex
 
OK. Thanks again Alex. I may have to scrap the idea then because I already have 50 of the PCBA's made and adding an IC at this point is out of the question. I was hoping for a simple fix that would miraculously fix the problem!:???: Not to beat a dead horse, but I mentioned in my first post that apparently it will transmit if the RX and TX pins are shorted. Any chance that there might be a simple way to connect them,but isolate them from each other at the same time?

J
 

The Tx and Rx can be connected without a problem if you want to make a loop back test, in that case you receive the same byte you send but I don't think you can connect them like this in your circuit because you have the output of the optocoupler driving the Rx line so you will have two transmitters connected together.
 
OK. Great info as always Alex. I really appreciate your willingness to help!
 

I'm sure there is a quick and dirty way to do this but I can't figure it out (yet...).
You want to be able to send and receive from the same pins (midi) but how will you make this selection so that the mcu knows if it should receive or transmit?
I mean that there is a need for a setting that separates these two actions, can it be a jumper or you have an electronic way to do this?
 

Yes we want to send and receive, but not from the same pin. Basically, as I understand it, the midi only travels in on midi in and out on midi out. So as long as there is only one set of commands going or coming there shouldn't be any interference. My light system is "in" or "through" only, but we want to be able to send the settings to the computer for easier set-up of the computer application. The application will be able to store those setting and send new ones if the user desires. There should never be a time when my product is sending and receiving at the same time. Make any sense? If by some chance there is, then I imagine that the info would be corrupt.

Below is the routing info that we are trying to acheive. Blue is the transmitted data and red is the receiving or through data.

MKProSysExIssuesroute.jpg
 

So the mcu will receive command through the Rx line and then it will start sending through the Tx as an answer to the request.
If there is no case when the Rx will receive data while the Tx is transmitting then the transmit signal will go to the through plug fine (assuming it can drive the 1k8 resistor) but the problem is when you are in receive mode, in this case if the TX pin is either low or high you will have problems.

One solution I see is to use the TXENn: Transmitter Enable bit flag to disable the Tx operation and set the pin as an input with no internal pullup, this will actually make the Tx pin a high resistance input so it will not have a problem with the Rx signals, you have to check if this is actually the behavior of the pin because I haven't done anything similar.
Also to disable the Tx pin the transmit buffer has to be empty.

Alex
 

OK, I will pass this info on to our programmer and make sure that we are all on the same page. Maybe I can get him to post up if he has more technical questions since this has gone beyond my experience level.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top