A toggle switch connects to the ATTINY. The ATTINY either outputs a static low signal or a ~100Hz square wave (alternating high/low voltage) dependent on the switch input. This connects to one of the FV-1 ADC (via a series capacitor?). An alternating current is necessary as the audio ADC input can't read 0Hz signals. This input is then run through a rough level detector:
Code: Select all
equ Rfilter reg0
rdax ADCR, 1 ; read input
absa ; get absolute value
sof 0.01, 0 ; perform portamento filter (could be consolidated with the 'rdax ADC...' instruction)
rdax Rfilter, 0.09 ; ...
wrax Rfilter, 0 ; store filtered output, clear