one wire protocol

noweare:
So, I am wondering why the pin did not get pulled up because of the last instruction

        while (1);   //here's there reason!

that line basically makes your code stuck in an infini loop which it cannot exit and restart the main loop. comment that out and it might fix your prob