Might sound a bit silly, but, maybe if you drew us a quick picture of what you want the output to be, like if it was a picture from an o'scope, we might be able to better understand what you actually want.
The last post by Pic_User sounds like that might be the problem, simple mistake, easily fixed...