No hurry, just idle curiosity.
Here's a copy of RenServo. I thought that Chris took your basic code and modified it for servo use -- the serial data input looks the same to me and the general outline of the software seems to follow the normal Renard structure.
dirknerkle wrote:Here's a copy of RenServo. I thought that Chris took your basic code and modified it for servo use -- the serial data input looks the same to me and the general outline of the software seems to follow the normal Renard structure.
Looking at that code, it appears to me that there is no 'slush' time at all in the ISR. In the original Renard the ISR is entered once every 30 uS or so, while in the servo code it's entered once every 4uS or so when it's active (it's not active all of the time in the RenServo code). With a 18.432 MHz oscillator the ISR is entered once every 18 instructions, or so, and the ISR takes about that same number of instructions (all of this is approximate off the top of my head). It's not surprising that adding instructions to the ISR would break things. It would have been better to place the instructions for limiting the servo range down in the 'phase0', 'phase1', 'phase2' and 'phase3' code near the end of the assembly file.
P. Short wrote:Looking at that code, it appears to me that there is no 'slush' time at all in the ISR. In the original Renard the ISR is entered once every 30 uS or so, while in the servo code it's entered once every 4uS or so when it's active (it's not active all of the time in the RenServo code). With a 18.432 MHz oscillator the ISR is entered once every 18 instructions, or so, and the ISR takes about that same number of instructions (all of this is approximate off the top of my head). It's not surprising that adding instructions to the ISR would break things. It would have been better to place the instructions for limiting the servo range down in the 'phase0', 'phase1', 'phase2' and 'phase3' code near the end of the assembly file.
Yes, I believe I remember that's how I did it. And please don't laugh at my code...it's actually my first "large" project.
I thought I created a minimum and maximum but I may have just done that in the 3d object suite. If I remember correctly, the only place to really add any kind of minumum and maximum per channel would be in the phase setup sections.
Not that it's needed anymore but my website is fixed. The firmware can be downloaded from http://ctm.maloneylights.com/downloads/
