pwm with delay

Thanks, Nick. That's what I'm trying to do. In my previous post I said that the first bit example of code that I modified from arrch was working correctly. It isn't. I doesn't increment every 10ms; It increments as fast as it can. The "delay" functions aren't working. I'll play with it a bit and see if I can get it to work. I know I shouldn't worry about it as the second posted code in my previous post works, but I just like to try to understand things. Maybe there will be a situation where I could modify the code into something useful.