sayzer,

The LEDs are there to indicate that the code went into the sub routine or through the loop. I tried driving the piezo though with the high and low command but it did nothing. Its why I resorted to asking the forum. I think I'll use the while statement though. I was just testing out the different components of my project with respect to their code. I'm doing an alarm clock with some RF technology integrated. I used LEDs to check if they my code was working properly as a way of debugging. I understand its not the most efficient way of doing things but it worked well with small parts of my code.

Thanks for taking the time to revise and update my code. I'll look more into it some more in a bit. I appreciate it.