A low friction potentiometer (servo pot) with a PIC with onboard A/D (16C54, 16F876 or the like) would be your quickest solution. A pot gives you nearly infinite resolution (limited by the A/D width and noise) and is easier to use than an optical encoder since it also gives you absolute position. You'll need to create a 'dead band' when you are near your set point to prevent the motor from hunting back and forth because of noise or circuit drift. In other words, if the position error is less than some value, don't do anything to correct it. If you want an 'all digital' solution, you could add a magnetic reed switch on the motor shaft, and count turns past 'end of travel'. This is how the big satellite dish receivers do it. The down side is that you'll forget your current position if you have a power failure (or not if you use the 16F876 and store the endpoints and current count in EEPROM). Robert Alex wrote: > > I am a newbie to using PICs and have been reading and experimenting using > Mike Predko's book and some others. I have decided that a project would be > the best way to get further involved and get more experience. > I would like to build an improved controller for an amateur radio antenna > that I use. > It has a large variable capacitor that is motor driven. The control box has > four buttons; up, down and coarse,fine. This cause pulses to be sent to the > motor and the capacitor turns the capacitor to tune. I would like to use a > PIC so that some of the points in the tuning range could be stored and > returned to without the "manual" tuning that I have to do now. > The two things that change are capacitance and angular rotation. I suppose > angular rotation would be easiest to store,but would mean adding something > to the shaft that could be counted. The rotation is about 80 degrees and has > switches that indicate the end of travel. > I know this is asking a lot for a new guy, but if you could just point me > to some other projects that might be similar or suggestions in general how > to do it. > One last question. I have been using assembler and the Epic programmer, but > would Basic or C make my life easier especially with bigger projects. I have > some programming experience with both. > > Thanks very much > > Alex > > -- > http://www.piclist.com hint: The PICList is archived three different > ways. See http://www.piclist.com/#archives for details. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.