So if I want alternating output, I have to update DAC register in the loop?

which statement will do that write?