Thread: PEC and PICs
View Single Post
  #2  
Old 28-04-2008, 01:00 AM
citivolus's Avatar
citivolus (Ric)
Refracted

citivolus is offline
 
Join Date: Sep 2007
Location: Carindale
Posts: 1,178
The first obstacle will be the time base. The internal oscillator in the PICs is highly variable based on the supply voltage and temperature, so you will likely need an external clock source.

You'll find that you are essentially creating a lookup table, which takes each of the four output lines high or low for a variable period of time while stepping through the table, say one byte for control line state/direction enable, and one for the time interval to take the line high (milliseconds, etc). You'll also want to code a highly accurate delay loop to handle this part.

You will also need to have an interface to an index on the worm, so that you can calculate where it is in its rotation. Typically this is via a magnet; you could probably use a reed switch or hall effect sensor, or even an LED/photodiode pair if there is adequate room.

The PIC will need 4 outputs for guider control, which double as inputs during programming. It will also need one input for the gear index, and assorted inputs for playback and record modes, and start/stop. I'd also recommend mounting the PIC in a DIP socket, so that you can pull it out to read/modify the stored PEC data if the urge strikes.

You can probably handle going to the index point on the gear by switching the mount to a faster drive rate and then having the PIC send guide signals until the index is found, and then manually switch the drive back to sidereal before starting record or playback mode.

Final note for today: Program it in C. The compilers are cheap, and your brain will thank you. I'll be interested to see where this goes.

Regards,
Eric
Reply With Quote