Setting up UART RX on FRDM-K64F for MIDI Communications?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Setting up UART RX on FRDM-K64F for MIDI Communications?

1,672件の閲覧回数
nicholasdiggle
Contributor I

I'm in the process of programming a MIDI input function, though the use of the K64F's UART capabilities.

The specs for the MIDI protocol are below:

Baudrate of 31250 (I found that using a baudrate divisor of 41, and a baudrate fine-adjust of 30 gave me the closest value at 31254.1), a HIGH start-bit, LOW stop-bit, 8 data bits between the start/stop bits, LSB first in data sequence; pretty similar what UART already is, except that the 5-pin MIDI interface is current driven, but I've got the optocoupler circuitry for that already taken care of. I'm trying to generate an interrupt each time new data is received by the UART interface, so that I can trigger other actions in-software.

If anyone could guide me on how to set up UART RX on the K64F for the specs I described above (through use of processor expert, baremetal code or anything else, really), that would clear things up a lot. I'm a bit of a newcomer to using UART, so any help would be appreciated.

ラベル(2)
0 件の賞賛
返信
2 返答(返信)

1,358件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Nicholas,

For the MIDI signal timing, I think it is the  same as that of UART, the UART can implement the requirements:

8 bits data, No parity, 1 start bit, one stop bit, LSB first. You can use interrupt mode to get or send data.

Regarding the hardware connection between MIDI and UART, I think the website is helpful.

The MIDI Physical Layer

BR

Xiangjun Rong

1,358件の閲覧回数
nicholasdiggle
Contributor I

I will look into that.

Thank you for the help!

0 件の賞賛
返信