The waveform posted by Picuser is what I want the output to look like. The actual output is the inverse and I don't understand it. Perhaps my compiler is corrupted?