The Mux

From YSTV History Wiki
Jump to navigation Jump to search

The main mux is the huge black thing in the AV rack, it routes video to different places, and also has analogue TV demodulators in. The main mux is controlled by an outboard box which sits on the directors/vision mixers desk.

Functions

  • 32 input to 4 output matrix
  • 2 Nicam stereo tuners

Faults & unknowns

2 composite inputs to the matrix are dead.

Red buttons have unknown function.

Controller pinouts

1 +5V power
2 0V ground
3 32x4 crosspoint switch control lines
4 consisting of a clock (rising edge trigger)
5 CS (active-low) and Data
6 NC
7 Station Tuner control (I2C Data)
8 Net Tuner control (I2C Data)
9 Station/Net Tuner common control line (I2C Clock)

explanation of operation

This was originally based around a PIC16F84 with an 8MHz crystal containing code written by Rob Sprowson. The hex file as loaded into the PIC can be found here[[1]] whilst a partial disassembly of it can be found here [[2]]. Also available is a disassembled version of the ROM code [[3]] from within the BBC micro that used to be part of Schedula.

A new PIC, a PIC18F2455 using a 20MHz crystal, has replaced this PIC through use of an extra 'daughter' board. This change in PIC was to allow easier coding, using C instead of assembler, and to provide USB capabilites. The source code can be found in Main Mux Source Code.

Six 74HC595 shift registers are daisy chanined together to form a single large serial-to-parallel converter to control all of the LEDs and the buzzer. The data is shifted in in the following order, with high to turn the LED/buzzer on:

Shift register output, leftmost exits chip first
Bottom Row Right LED . . . Bottom Row Left LED 2nd Row Right LED . . . 2nd Row Left LED 3rd Row Right LED . . . 3rd Row Left LED Top Row Right Green LED . . . Top Row Left Green LED Mux4 LED Mux3 LED Mux2 LED Mux1 LED Obey LED Not Used Not Used Not Used Buzzer 7-seg Top 7-seg Top Right 7-seg Bottom Right 7-seg Bottom 7-seg Bottom Left 7-seg Middle 7-seg Top Left

The data is shifted in on the rising edge of the clock line. This clock line has multiple destinations and also clocks the Mux ICs in the rack and the 74HC597 ICs in the controller used to shift the button states into the PIC. Once the LED data has been shifted to the correct position within the shift registers, a rising edge on the Storage Register line moves this data to the outputs of the ICs, and hence the LEDs/Buzzer.

Five 74HC597 ICs are used to create a single parallel-to-serial converter. The order of buttons fed into the PIC is that same as the order of the LED data is shifted out of the PIC (see above). The only difference is instead of the 3 unused LED states there are the three remaining buttons on the controller. The data is shifted on the rising edge on the shared clock line (see above). Before shifting of the data commences the Parallel Load line must be cleared, a rising edge must occur on the Storage Clock line, and then the Parallel Load line must be set.

The state of the Mux ICs in the rack unit is controlled via 3 lines: Chip Select (CS), Clock and data. Before communication with the ICs begins the CS must be cleared (active low). 64 bits of data must then be shifted into the the ICs (clock active rising edge) before setting CS to select the new inputs. The 32x4 Mux is generated using four 8x4 ICs with their outputs commoned together. Therefore the data is organised into four blocks of 16-bits, with each block controlling one of these ICs. For information on the order in which to clock in data, see the datasheet [[4]]. Importantly only one of the Mux ICs should ever be driving each output from the mux, with the outputs on the other three ICs all disabled.