Serialized link from Autostar 497 to telescope base>

With a bunch of help from Andrew J, including his "Cheap'n Nasty 5 channel logic analyzer"!

(Thank you Andrew!)

Page created Nov 26, 2009
Serializing the interface between the Autostar 497 (original version) and the scope base.

The 497 has some tight timing requirements for interface with the motors cards
and the motors cards have a variable response time to the commands sent.
The 497 gates data out on falling edge CLK and holds it stable until rising edge CLK
The tighest timing is found on the rising edge CLK after last bit of CMD byte sent to the motors.
Here the motors can take up to 73us to respond and there is only sometimes 85us CLK high.
(The 73us for motor side to respond is based on a circa 2001 etx70 base,
how long other motor cards -actually- take is unknown!!!
What this means is the PIC must recognize the CLK change as last bit of CMD, send the data to the motor side PIC
The motor side PIC must gate the data to the base, wait for 75us then send the state of the DAT line
back to the 497 side PIC (if it is a 'read' type command) which then gates it out to the 497
all in 12us including the serial transmit/receive times.
At 4Mbaud link the xmit/receive time on the wire is 5us (2.5us X 2)
The 497 side PIC takes <<1us to recognize CLK rising after last bit of CMD
The motors side PIC takes about 3us overhead to receive and parse the request, waits 72us
Then sends sample of the DAT line back which the 497 side then gates to the 497.

The 497 then samples DAT on the next falling edge when it gates out CLK
So out of the 85us or so available, 80us is taken up. The 'spare' 5us is too close a timing
to allow running at 2Mbaud link.

Basic schematic

What the prototype looks like on the bench just after completing a fake align
Left middle - Power to 497 into the 8P8C adapter
Bottom - using the USB-ST4 as general purpose board, one talks with 497, other talks with base
Red, Black and White wires are the 3-wire serial link between the PIC's
Notice the "Less the 5' from the pole" message on the 497 after the fake align

Still to do:
1) Add AuxBus support, need all Aux commands possible
from all Aux devices and directions/bit counts for all Aux cmds
2) Anyone know a good RF person to put this all on a -fast- RF link???