UART serial between defined ports

Sorry I misunderstood a little bit my task.

So what I want is the following: I have the Leonardo connected to the PC via USB and later I would like to send data from Matlab to the Arduino, if I am not wrong between the Arduino and the PC there is serial communication on the pins 0 and 1.

The data I send from the PC I would like to send it with an LED connected to one of the pins and I want to receive it with a photodiode which will be connected to the same Arduino on a different pin. Between the LED and photodiode I would like to have the same serial communication.

For now I just wired together 2 pins to see if it is possible to use or define somehow another serial channel apart of the 0/1 pins between the Arduino and the PC.

So my question is: is it possible somehow to define one pin as receiver and another as transmitter and have UART between them? For now I'd just like to send one char or something just to see how it works.