You don't set the port pins as outputs anywhere. Write to the data direction registers for each port.
Also, using loops to cause time delays is considered poor programming. They keep the CPU busy when it could be working and they make the code non-portable. Use on-chip hardware timers instead.