Unfortunately, I'm not fanmiliar with mikroc. But the basic software UART operation is to poll the input pin or possibly use a port B change interrupt and have a timing reference, either by a software delay or a hardware timer. After a start bit edge, wait 1/2 bit duration and then sample the data a the defined bitrate. Hardware UARTs usually oversample the input pin at 16 x bitrate.
The bitwise synchronization performs a pattern match. If a mismatch is detected, it's restarted on the next bit. A standard preamble, a continuous 1010 sequence, doesn't determine the frame boundary. Instead, it uses a sync character after the preamble. It's detection starts the packet receiption.