The PWM pins are marked with a printed "~" on the board. analogWrite on a non-PWM pins acts just as you've described.