I'm assuming you have one stepper in for each axis (say X and Y). A simple way to generate the circle would be to move the light cource to the position given by: X=A cos wt Y=A sin wt where: A is a constant which controls amplitude of motion w is a constant wich controls the speed of rotation. To control the light source, it would be simply a matter of generating sin and cos waves (or two sine waves 90 degrees out of phase). Obviously, you can extend this idea to make squares (from square waves) and other results from other signals. I've never delt with stepper motors so maybe someone else with more experience can be of more help. Sorry about the typos, it's late here. Regards, Vincent Deno > I have a PIC controlling 2 stepper motors connected to a light source. > > I need to move the light source in a circle and a spiral. > > Does anyone have PIC / 8031 based algorithm to draw circles ? > > Thanks > > Pailoor > > ================================================ > For Embedded Controls Solutions and Custom Designs > ------------------------------------------------------------------------ > > CHIP TECHNOLOGIES - Member, Microchip Consultant Program > Bangalore > INDIA > Email : chiptech@vsnl.com > Webpage : http://business.vsnl.com/chiptech ( updated 16th Feb 1999 ) > ================================================ > -------------- Vincent Deno Design Engineer Theta Digital Corp. www.thetadigital.com denovj@email.uc.edu _____________ | ____ ____ | |/| | | | | |\| | | |/| |\| | | | | | | | | | | | |_/ | | \_| | | | | | | | |_/ /___\ \_|