Scope Hardware Controller

A refinement! - Including partial implementation details. Very dangerous at this stage of the design.

Here I'm focusing on the serialization that's needed. I do not propose to have 50 odd wires leading to a PC. That is silly - as well as unreliable, messy, horrible...

Key:

Data frame from the scope hardware to the PC and slave PIC's

Command frame from the PC to the slave PIC's

Clock and Load Timing control from the master PIC

Terminology. The master PIC interacts with the PC, performs asynchronous conversion (start bits/ stop bits) and CRC. 

All other PIC's are slaves. The slave PIC's all sit on the same bus - Each getting data from the PC, From the scope and timing from the master PIC. All are fed in parallel. No slave PIC affects any other PIC. Each slave PIC will decide what to do with the supplied data. We could have separate PIC's for each motor, or driving a display... I've chosen 3 PIC's. I think this give a flexible design approach.

All PIC's are entry level 16L84 (18 pin) devices. Using external 8 bit shift registers mean we don't need devices with a larger pin out.

Evolutionary implementation...

Stage 1

Ignore the safety PICS

Ignore the scope data leading to the control PIC.

The PC receives scope encoder data via the shift register. This stream is converted to asynchronous  form by the control PIC.

Each Axis motor (direction and speed) get be driven from a bit in the 48 bit frame from the PC. This will get a working interface.

... but a dangerous one. (Like the motors will still keep on turning should the PC stop sending command data.)

Stage 2

Implement the safety PIC. This will shut the power down if the dish gets to near the limits. Note the Timing and Safety PICS will always be running - independent of the PC.

Stage 3 - Final

Change the PC TX protocol so a desired HA DEC is presented in "encoder" form. The controller PIC will now have some work to do. It will compare the target with the current position and drive the motors "intelligently". The Safety PIC operates as before. 

Clocking Speed 

We have to "keep up" with the real time data. That is the dish spinning around at 15 per minute. The 16 bit encoder will change 46 times a second. To ensure we capture every transition, using a 48 bit frame, the shift register will need to be clocked at 2184 bps. This is not an issue - we needn't worry if we miss a reading anyway. 

Comments

The Dispatcher and "OI" controller (using  XML) become part of the same module. The hardware controller only performs serialization, safety, and limited comparison logic.

The design cannot progress until we know what we're driving. Interfaces specs required.