In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Tinker wrote: Guenther, thank you very much for the reply, and your absolutely correct the PWM command will not support what I wish to do. Your outline is actually quite helpful. I'm still a little lost on running an ISR as far as timing and interfering with other functions of a program so for now running the counters in the main program is probably best for me. A quick clarification on ISR's though if I may. Using the RTCC to trigger an ISR my understanding at the moment is that wherever the program is it will jump from there to the ISR and then return to execute the next line of code. Is this correct or will it return to the program start or Main? If I understand that right then the few clock ticks it takes to increment the timers in an ISR would only have a negligable effect on whatever else I'm doing. Also thanks for the book that came with my SX Kit, the time I've spent leafing through it at this point has given me a fantastic glimpse of what the SX is capable of, and enough understanding to gain useful information of PJV's code example. PJV, Even though assembly is still a mostly foreign language to me your code example goes a long way to giving structure to what Guenther was describing and how to accomplish of what I am looking for. The commands I mostly dont understand but the structure and program layout seems like it would be the same in SX/B at least I didnt see anything that couldnt be implemented. Between the layout and the comments its a tremendous help, and I'm sure will go a long way toward helping me accomplish my eventual goal of getting more into assembler. Just sat and went through it for the last hour getting a feel for what its doing. It looks like the key I was missing was selecting units of time that fit in with how I wanted to ramp the duty cycle and the fact that I could basicaly run a clock not in absolute time but tailored to what I want to do, and the light hits as I sit here and reply, I was looking for the math to calculate absolute constants for the steps in percent of duty cycle to acheive the ramp rate I was looking for when in actuality all I need to do is increment a variable from 5-95 one increment at a time over a set time period and snatch the duty cycle variable from that count as time passes...... Thanks again for the example, I'm not sure of thats exactly what your doing but it helped a lot. Javalin, Thanks for pointing this out, I'm off to search for his project and see what I can glean from it, if I remember right though it was controlling duty cycle through external commands via serial and the part that was stumping was basicaly ramping through a scheduler. Either way I'm sure I'll pick up something useful from it. If nothing else maybe I can puzzle out the scheduling now that its considerably later with much more reading since the last time I looked. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=104114#m104172 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)