analogWrite() glitches in MSP430

Rehashing issue #372 here with a fresh branch- the previous branch was a pile of git commit spaghetti.