In addition to the PWM approach (which works great), PICs like the 16F628A have an on-board Voltage Reference Module (based on a 16- tap resistor ladder) where the output can be directed to RA2. This module provides limited D2A capabilities, but it might be useful for your application. See the data sheet for your PIC (section 11 for the 16F628A) and see if it might work for you.
Bookmarks