You could still use 1 Analog pin and few resistor.. kind of R-2R network.

You could refer to tip #5,6 and #7 of the Microchip Tips and trick DS40040B
http://ww1.microchip.com/downloads/e...doc/40040b.pdf