I used a DAC (digital to analog converter) formed with an R2R ladder on a PIC port, to generate a near perfect sine wave.
Generate the values you need with a spreadsheet using the Excel SIN function, put them in a software table, then periodically go get the values from the table one at a time, and write them to the port, with appropriate delays between writes.
You might add a capacitor to the output of the ladder for smoothing.




Bookmarks