# This is the DPP register Config 0x8000 variable Config 0 variable Config.ITRG 0 variable Config.DualTrace 0 variable Config.AP 0 variable Config.OscMode 0 variable Config.TimeTagMode 1 variable Config.ChargeMode 1 variable Config.Extras 0 variable Config.DVP1 0 variable Config.DVP2 0 variable Config.NoDVP 0 variable Config.AutoFlush 0 variable Config.Waveform 0 proc GetConfig {} { variable Config variable Config.ITRG variable Config.DualTrace variable Config.AP variable Config.OscMode variable Config.TimeTagMode variable Config.ChargeMode variable Config.Extras variable Config.DVP1 variable Config.DVP2 variable Config.NoDVP variable Config.AutoFlush set Config [ReadRegister Config] set Config.AutoFlush [expr $Config & 1] set Config.ITRG [expr ($Config >> 2) & 1] set Config.DualTrace [expr ($Config >> 11) & 1] set Config.AP [expr ($Config >> 12) & 3] set Config.OscMode [expr ($Config >> 16) & 1] set Config.ChargeMode [expr ($Config >> 19) & 1] set Config.TimeTagMode [expr ($Config >> 18) & 1] set Config.Extras [expr ($Config >> 17) & 1] set Config.DVP1 [expr ($Config >> 23) & 7] set Config.DVP2 [expr ($Config >> 26) & 7] set Config.NoDVP [expr ($Config >> 31) & 1] if {[set Config.NoDVP] == 1} {set Config.DVP1 8; set Config.DVP2 8} } proc SetConfig {} { variable Config variable Config.ITRG variable Config.DualTrace variable Config.AP variable Config.OscMode variable Config.TimeTagMode variable Config.ChargeMode variable Config.Extras variable Config.DVP1 variable Config.DVP2 variable Config.NoDVP variable Config.AutoFlush if {[set Config.DVP1] != 8} {set Config.NoDVP 0} else {set Config.NoDVP 1} set Config [expr \ ([set Config.AutoFlush]) | \ ([set Config.ITRG] << 2) | \ ([set Config.DualTrace] << 11) + \ (1 << 4) + \ (1 << 8) + \ ([set Config.AP] << 12) + \ ([set Config.OscMode] << 16) + \ ([set Config.Extras] << 17) + \ (1 << 18) + \ (1 << 19) + \ (([set Config.DVP1] & 7) << 23) + \ (([set Config.DVP2] & 7) << 26) + \ ([set Config.NoDVP] << 31)] WriteRegister Config $Config } proc DrawConfig {} { variable Name set html "" append html "
" append html "
| Auto Data Flush (B0) | " append html "Trig Propagation (B2) | " append html "Dual Trace (B11) | " append html "Analog Probe (B12) | " append html "Waveform (B16) | " append html "Extras (B17) | " append html "Time Tag Mode (B18) | " append html "Charge Mode (B19) | " append html "Digitial Probe #1 | " append html "Digitial Probe #2 | " append html "
| " append html "" append html " | " # Bit 2: Trigger Propagation : append html "" append html "" append html " | " # Bit 11: Dual Trace : append html "" append html "" append html " | " # Bit 12: Analogue Probe : append html "" append html "" append html " | " # Bit 16: Oscilloscope Mode : append html "" append html "" append html " | " # Bit 17: Extras append html "" append html "" append html " | " # Bit 18: Time Tag Mode append html "" append html "" append html " | " # Bit 19: Charge Mode append html "" append html "" append html " | " # Bit 23: Digitial Virtual Probe #1 append html "" append html "" append html " | " # Bit 26: Digitial Virtual Probe #2 append html "" append html "" append html " | " append html "