Thanks, Richard. Now, I'm using the Darrel's USB interrupt and it helps. It is not really crucial in my program if a package is lost using the SERIN2 or SEROUT2 commands. I changed my code like it's shown below and it's working fine so far.

'FOR J = 0 TO 7
USBSERVICE
GOSUB SearchForClockSignal
USBSERVICE
'IF ClockSignalFound = 1 THEN EXIT 'EXITS THE LOOP IF A CLOCK SIGNAL WAS RECEIVED
'NEXT J


SearchForClockSignal:

USBSERVICE
SERIN2 PORTB.7, 32, 50, CLOCKSEARCHFAILED, [STR RFID_IN\7]
USBSERVICE

'ClockSignalFound = 1 'SETS FLAG TO STOP SEARCH

CLOCKSEARCHFAILED:

return