Looking good.

Now go back here http://www.picbasic.co.uk/forum/showthread.php?t=9741
and re-read how to store and read the value.

If there is a part you do not understand ask a specific question, it will make it easier to help you.