To be able to write to SFR register you need to use modify() call.
This way you will get the correct syntax and to find out the name for the SFR.
writeRegister() is used for writing to Core Register.
modify()call works same as Watch Window. If you can access in the Watch Window you can use the modify()call.
Sorry this article didn't answer your question, we'd love to hear how we can improve it.
Note: This form won't submit a case. We'll just use it to make this article better.