The Contrast Init line should read
Set contrast FROM $01 to $FF NOT Set contrast to $01 to $FF.
Therefore $FF is the upper limit.

Good luck