This is a good place to start.
http://www.picbasic.co.uk/forum/show...=olympic+timer