I meant how can i get the max and sampling time at pic clicked at 20MHZ
The sampling time is determined by the system response time and can be determined by modeling or, better, measuring. Then you when you write the code you determine a time interval that is appropriate and convenient for the processor used. Using one of the PIC's hardware timers is a good way.
Your PIC runs at 200nsec per instruction cycle. One of the PIC's hardware timer/counters and an ISR can be used to set a sampling interval.
Did you read AN532 & AN937?.
Did you google PID, PID timing, etc and read?