I'm a bit confused by the CWG setup on the PIC16F150x-series. The datashee= t gives a very specific sequence that should be followed, but I discovered = that the C-code generated by the MPLAB Code Configurator doesn't follow tha= t sequence! =20 Here is some basic Assembly code I wrote (note that it's preliminary and no= t complete), which follows "26.11 Configuring the CWG" in the PIC16(L)1508/= 9 datasheet. Refer specifically to the "CWG Setup" section inside my assemb= ly code below. (A link to the PDF datasheet is also given in my code.) https://cl.ly/0i091i3W2V3d And here is the C code generated by MPLAB Code Configurator: https://cl.ly/0G2W0g47410Z NOTE: I used *.txt filename extensions (instead of *.asm and *.c) to make t= he text readable in-browser. I am not a C programmer, but I assume each line of C code executes sequenti= ally as the assembly code does. If so, then clearly the C code doesn't mat= ch the datasheet sequence. Note that my assembly code does match the speci= fied CWG setup sequence (in the datasheet). Obviously, I would appreciate hearing from someone with experience getting = the CWG to work. Is it not important to follow the datasheet sequence for = CWG setup? Also, should my NCO code come before or after the CWG code (in = Assembly)? Thank you, James Wages --=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 .