>>Any reason for using 16 bit shift register if you are >>riding PICs? >> >>Mike. >> > >So I can alter the waveform manually, via trimpots, without having to >reprogram. > >For example, to conserve power I can reduce the duty cycle but still have a >rounded waveform. Not to mention experimenting with assymetrical waves. > >Someone mentioned using PWM instead of a shift register, but that would >similarly limit this type of wave shaping. I suspect that PWM could make it easier to do an arbitrary waveform. By having a sine table in memory you can step through it at any rate you want, and can also arrange scaling of the values as you go to get amplitude variations. I have planned this sort of thing in the past by using ROM tables, although that part of the project was canned before I got the coding done. However by using such a table as a base, and then downloading adjustment values into EEPROM on the fly you could make arbitrary adjustments to the waveform quite nicely. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.