^36 - The Analog Fader Port

This port is a read only value of the current state of the analog faders as a two byte value.
It reports a raw value of the current state of a single fader.
This port can be used to make one fader a master fader for the others.

Only works for UPAN 9 fader panels, does not work on the analog inputs of the DDMIDC8.

Syntax

LDA ^36,x
Where x is the subport.
After fader 1 the Lo byte subport is (FaderNum-1)*2
After fader 1 the High byte subport is (FaderNum)*2+1
LDA ^34,0 //Reports the low byte of state of the first fader
LDA ^34,1 //Reports the high byte state of the first fader
LDA ^34,2 //Reports the low byte of state of the second fader
LDA ^34,3 //Reports the high byte state of the second fader

Example

This task would trigger different presets at different levels.

Task1()
{
LDA ^34,1      //Get the Fader state
CMP #P1Threshold
BRC Preset1   //If higher than P1 Threshold branch
NULL
Preset1:
    CMP #P2Threshold
    BRC Preset2   //If higher than P2 Threshold branch
    Preset(A=2,Preset=1)
    NULL
...
}