Noob tech question on MiDi in

I need to ask the experts on this forum a question on a MiDi in circuit. How can I calculate the resistors values in the output side of an optocoupler? Taking Shruthi-1 digital board as an example, how is the 10k resistor (R14) value choosen?

Thank you guys.

It’s a trade-off between hard edges and soft edges.

Edges too soft => might cause reception problems.
Edges too hard => might cause unwanted HF emissions / interferences; causes problems with the ATMega644p and ATMega1284p due to a hardware bug of these chips in DIP package at 20 MHz.

For the 6N137 1k … 10k is the sweet spot.

So there is no way to calculate it, I have to scope the signal and proceed on a trial base, right?

Yes.

Thank you Oliver.