You will have better luck getting an answer to you C code problem on a forum that does C. This forum is for PicBasicPro.