4-Bit Internal DAC Demo


Many of the PIC microcontrollers, like the PIC16F88, give you access to an internal DAC. In this exercise, we'll see how to do so. It's a 4-bit DAC, so has a 16-step resolution.


As you can see, the circuit is simple. The internal DAC needs to be buffered, so I also took the opportunity to amplify and level-shift the waveform. What comes out is a nominal 10Vpp (suitable for music synthesizer use). In the demo, the waveform runs near 9 kHz, but this can be slowed down with some appropriate delays in the code.


Once again, I found a 10 pF feedback cap useful for truncating the undershoot occurring on reset.

Click to get the source code.
Click to get the schematic PDF.

Next Project: 7-Bit DAC Demo

No comments:

Post a Comment