sorry for the bother, I got this one...:-) frequency=800; //Starting value freq_dur=(1/frequency)/2; Sometimes it is right in front of your nose and your can't see it. Also, 4 hours of sleep last night can make things fuzzy. Gordon Varney www.iamnee.com > > I need a pin to clock out a square wave at 800Hz. Simple, just set pin high for 625us, set pin low for 625us, and > repeat. > > Now I need to increment the clock frequency by 50Hz, do some work and increment by 50Hz again, continue incrementing > until complete. The step duration in a time period is not a constant. What is the best method to incrementing the > frequency by 50Hz. > > (Note: I am using a combination of Assembly and the CCS compiler for this program.) > > Gordon Varney > www.iamnee.com > > -- > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > > -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu