Thank you all for your comments so far. It is specific requirement that the motors posistion is checked for every step. The stepper is going to be used to mount an antenna to which is then going to be rotated through 270 degrees facing a transmitter. The goal o f this is to form plot of rx'ed signal strength against angle of attenna to transmitter. I like this idea of using the timer as I can check that the count is 3 every tim e I step the stepper motor. This will be respectively slow but in the overall system I can't see this being a problem. I shall be using the idea that has been suggested about 'homing' the stepper i.e. giving it a starting point by using micro switch or some optical device. I think I will use it to drive an interupt - maybe I new to the game. I have been considering the 16C74 so that I can use the built in USART as I need to interface to a PC via an RS232 serial port. I beleive that the voltage levels are very different though and I will need a convertor of some kind. I have been looking into the applications notes but I cannot see any examples where they have connected a RS232 to the USART and what they have used to interface it with. I get the feeling from the FAQ that this is an easy problem and has probably been addressed 100 ti mes. Thanks again for all your help so far it is of great use when you are first star ting into a new area to have plenty of advice. Regards Gary Dag Bakken wrote: > > Well... PICs can use timer 0 as a counter. This is a single bit in a > register to set. If you require the PIC to tell you when a certain > amount of pulses has appeared, some PICs have a compare function on > timer 1 that enables them to set a flag when a specific amount of > pulses are counted. Timer 1 is 16 bit, so you can do several turns > without checking the count, and the hardware will tell you when you've > reached you "destination". > > -DS > > Monday, August 30, 1999, 4:00:22 PM, you wrote: > > GC> I want to use a PIC to control a stepper motor and check that it has moved . > GC> The problem that I see is that if I have a 400 step motor and a 1200 encod er(if one exists) > GC> that every time a send a pulse to my stepper control board to move the mot or one step I am going to > GC> get back 3 pulses from a encoder. How can I firstly count pulses using a P IC and secondly how can I count the three pulses back when the > GC> PIC is already doing an operation (the stepper pulse signal). > GC> I can not think of how to do this. > GC> I have one hardware type solution and that is to feed the encoders output into a counter and then use the pic to read the counter value and > GC> then reset the counter every time but I'm sure that there must be some way to do this with the just the pic. > GC> Speed is not a issue with the system as the motor will not be moving very quickly. > GC> I am new to the PIC thing so please don't shout if this is dead easy to do . > > GC> Thanks & Regards > > GC> Gary > > Computer instruction and/or message: > Press CTRL-ALT-DEL to continue....