The difference is that SI and SO pins are tied together in 2nd code, via 1k resistor.