MCH wrote: > Maybe I'm getting too specific here. Let's make the net larger. > > Does anyone have an example of "working" ASM code that will configure > and output PWM signals? > Yes, the datasheet for the specific part. There usualy is a 1-2-3 guide on howe to configure the PWM module. You *are* talkig about the *hardware* PWM module, right ? > All I can find on the net is BASIC or C language. > Since it's mainly a questions about setting up a few registers correctly, it would/should be easy to do the same thing as the BASIC or C examples do, but in ASM instead. > I found one great tutorial site that says it has a section on PWM, but > "PWM" is not mentioned once in their tutorial. :-\ > > I also tried looking for app notes on the Microchip website. So, if > anyone knows of a URL for that, it would greatly help as well. > > Again, just looking for a 'how to' with code examples of ASM code for > the PWM output. It doesn't matter what is being controlled with the > output. > > I'm using an 18F4520, OK, then. Chapter 15.4.4 "SETUP FOR PWM OPERATION" on page 145. It's 5 steps, 1 to 5. It's not actual code, but it says which register to set to what. If you can't translate that into ASM, well, then you have other issues to fix first. > but any ASM code would be appreciated, as I'm sure I could translate it. > > If you want ASM code, why "translate" ASM code that you get ? > Thanks, Joe M. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist