The PIC32 does not have a built in DAC so you have two options.
1) use the built in PWM that is described
on this page.
2) use an R2R ladder network, but for 256 steps this will take up 8 pins. There is plenty of information on the net of what an R2R is and how to make one using 8 outputs.