Hi Russ, Sounds like no problem. I have read optical encoders before, and my approach has been slightly different, but not so far off that I wounldn't say that your method is quite do-able. I've done it with PICs that have timers, so I always have a timer-based interrupt, and test the encoders each time. you could also test the LPT port at the same time to see if the PC was wanting data. If you aren't doing much else with the PIC, you can set your timer to interrupt 10000 times per second, which will give you some headroom for mechanical glitches. There's an example of reading optical encoders on the Parallax ftp site, it's a simple task. If you are using a 16c55 just make the whole program run in a loop, polling the encoders, inc/decrementing the count, and polling/serviceing the LPT port each loop. Do your encoders have an index, or are you using some other method of initial alignment? Also, out of curiosity, whose encoders are you using? Cheers, Bob At 03:04 PM 8/19/97 -0400, you wrote: >Hi, quick background then my question: >I am currently plowing away through a project that uses a 16c55 @ 4mhz takes >input of 2 pins each from 2 high precision encoders (PORTA), one encoder per >axis on a telescope, each encoder puts out about 4048 codes / revolution, >what I am doing is reading the encoder pins with the PIC and keeping track >of a 2 byte variable per axis (Right Ascention and Declination) as part of >the routine I am polling a pin from the LPT port that acts like an interrupt >to the PIC so that the 2 byte variable can be placed on the 0-3 pins of >PORTC one nibble at a time, (I am restricted to 4 pins to 0x379 for input to >the pc) then the pic goes back to tracking the transitions of each encoder, > the goal for me here is to be able to manually rotate the telescope at a >reasonable rate and not loose accuracy as well as update my computer program >in quasi real time, for me a reasonable rate would be 90 degrees in 1 to 2 >seconds which would be roughly 1012 codes per 1.5 seconds. > >Question: > given the above information does this sound like the proper way to approach >this project or is there a better / easier or more efficient way of >attaining my goal. Maybe I have missed something obvious? > >Thanks very much in advance. > -Russ > > http://www.bobblick.com/