Then why would you suggest that Ken do it? Other than to add more confusion or a chance to say something else is better.
Why do you not post something to try helping. Always posting that another compiler is better is not a help. Other compilers might be better but that is not the issue here.
So I will ask you to not to post on this forum if that is all you have to say.
Dave
Always wear safety glasses while programming.
rmteo's comments DO help. I went to WIKIPEDIA and looked up PID and pretty much understand what it is - sort of. It ain't so complicated as the single formulaic representation makes it appear.
Question about PBP and my 16F887. I think the spec for my robocar says to produce one PWM pulse every 20 msec. Each pulse varying in width from 1 to 2 msec in 256 segments. A 1.5msec (created by 127 segments) pulse is neutral. In the case of my Electronic Speed Control anything above 1.5msec is FORWARD. Anything shorter than 1.5msec is BACK. What must I do to scale my chip's 4MHZ oscillator to accomplish this fete?
What I am presently doing I came across by trial and error. I am not sure what shape the PIC is actually producing.
Ken
Lets go back a little
http://www.picbasic.co.uk/forum/show...4621#post94621
Dave
Always wear safety glasses while programming.
I have not learned to SEARCH the forum.
How about I return to basics. How about I make my controls interrupt driven. If had an interrupt routine that ran every 20msec, I could create a true-so-spec PWM signal and I could measure rate of closing speed for each SONAR. I think the 16F887 can get all my work done in 20msec. If not I can up the PIC power.
Way back someone told me how to set up such an interrupt system. Where is that? It's Monday morning. Time to get moving.
Ken
Hey Ken,
I know a lot of people prefer on interrupt type. But my vote for easy interrupt is to use Darrels instant interrupts (and I think an equally large number of people like them as well). Here is a simple example of a blinky interrupt using his include files. The pages on this site have a lot of information about the different kinds of interrupts you can do. Your chip needs to use DT_INTS-14. And of course DT_INTS-18 is for PIC18 devices.
http://darreltaylor.com/DT_INTS-14/blinky.html
Last edited by ScaleRobotics; - 19th November 2010 at 15:20.
http://www.scalerobotics.com
I don't think you want on interupt, just my opinion from reading the manual. I think you want to figure out DT int. Seems to be true int without Dealing with ASM.
-Bert
The glass is not half full or half empty, Its twice as big as needed for the job!
http://foamcasualty.com/ - Warbird R/C scratch building with foam!
Bookmarks