Content originally posted in LPCWare by starblue on Thu Oct 24 02:40:13 MST 2013
You need to think of writing to SETENAF and CENAF as issuing a command, not as writing data.
The command is to set or clear certain bits in ENAF, respectively (and leaving the other bits unchanged).