Hi James, Interesting project. I had a quick look at the 16F1503 for an audio project myself, which would have included sweeping, or slewing / portamento from one note to another Note that as the NCO uses a timer, the method to use it will work for any timer. And being digital (the base unit is Tcy), there are certain limitations with resolution, which put me off it a little for my application. I agree that interrupts and look-up tables could be used to simplify the coding. There is some groundwork needed to generate the data but after that it's fairly straightforward. Even without NCO (such as the F84) the pins can be alternated with BSF/BCF at the end of each interrupt half-cycle So, you'd have an interrupt for when to reload the timer, one table for the reloads, one for the sweep period, (the number of interrupts), possibly one for the initial load but that could be done via a goto and the DIP switch If you choose a short interrupt period (eg 100us) you'll have finer control at the Hz level but it does mean a lot of changes (big tables) A coarse interrupt time, (eg 20ms) may cause the tone sweep to be noticeably made of individual notes. At each interrupt, the reload value for the timer used to toggle the outputs pins is decremented. That is, the timer period becomes shorter -> higher frequency Say you decide on 5ms, which will be increments of 72Hz from 500Hz to 2660Hz in 150ms, assuming you want a linear output curve rather than perhaps exponential So if the PIC is running with Fosc of 16MHz, Tcy =3D 250ns, the initial load would be 4000000/500/2 =3D 4000 for 500Hz. ie 4000 Tcy on (1000us) and 4000 Tcy off (1000us) -> 2ms period To change from 500Hz to 572Hz at the first interrupt, the load changes from 4000 to 3496. The on/off time is now 1144us each For the next change, to 644Hz, the reload is 3105. Notice that the difference between reloads has gone from 4000-3496 (504) to 3496-3105 (391). The last change, 2588Hz to 2660Hz, is from 772 to 751. So doing it this way you'd need to work out each reload and put it in a table. You could do it by calculation ((Fop / frequency1) - (Fop / frequency2)) /2 There's something for you to think about for now, particularly what frequency stepping incements are noticeable. I think that is going to be an important factor. We'd all be glad to help you out with the assembly code Joe ----- No virus found in this message. Checked by AVG - www.avg.com Version: 2016.0.7640 / Virus Database: 4627/12599 - Release Date: 07/11/16 --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .