Quote Originally Posted by mark_s View Post
Here's another example like aajgss's for the MCP4921. It generates a sine or cosine wave.
Would like to try speeding it up, using the MSSI or MSSp modules. If anyone has an idea for this
please post.
Thank you aajgss and mark_s. I should have been more specific in my original post, but I am not using the DAC to generate sinusoidal, triangular or square waveforms. All I am doing is outputing an analog voltage value that equates to a calculation performed by the MCU. So I don't think I need the complexity of a look-up table for generating an output analog waveform. Instead, I am just looking for example code to output an analog voltage by the DAC that will change in value relatively slowly every 20 to 100 msecs. Anyone have suggestion as to how to do this, or better yet example PICBASIC Pro code? Oh, and BTW, the DAC I am using is an MCP4921 not a MCP4291 (typo on my part).