I had some problems with uploading MIOS to the PIC. The reason was the bad signal quality at pin 26 of the PIC (RX). Thorsten recommended me to decrease resistor R6 to improve signal quality (CORE V3).
The old PIC16 design used a 1.8k, but this is too high resistance.
I use now R6 within a range of 560R ..680R with a CNY17-4 and stable upload capability (to be exactly: I’ve 1.8k parallel 680R). The current is now approx. 10 mA.
the problem with CNY17 is, that there are also parts which are “so weak” that a low pull-up resistor leads to a bad signal. This effect is propably caused by the manufacturing tolerance (german: “Exemplarstreuung”).
Ca. 5 years ago, we had the situation that everybody who bought a CNY17 from Reichelt reported good results with 1.8k, but everybody who purchased the optocoupler somewhere else had to adapt the resistor value to 2.2k (and not to a lower value).
Other people reported, that the optocoupler was only working with specific MIDI instruments.
At the end I decided to replace this optocoupler by a one with integrated amplifier -> the 6N138
So, I can only highlight it again: don’t use a CNY17