I am beginner with Pic Micro controller, my objective is use 16F876A I/SP and I want to automatically detect baud rates from any device. How can I do that, any ideas from seniors?

I use Latest Proton development Suite, and PICPRO BASIC version 2.46

Thank you all in advance