@tony-white agreed. I was thinking it might be the variable i was setting as the pwm length, but i tried several with no improvement.
Also it showed the same behavior with your arduino code, so i think its something with my arduino. Ill dig into it some tonight.
Thanks again for your time!