thanks for the reply that was exactly what i was looking for. I am basing my code off of this post http://www.picbasic.co.uk/forum/show...2&postcount=11. thanks again