Range of DACL/DACR? LED rate indicator
Posted: Mon Feb 14, 2022 10:21 am
This just isn't "clicking" for me at the moment. I'm trying to use DACR to create a rate indicator LED. I have the following to simply conditionally set the output depending on the sign of SIN1:
The right output just goes through a resistor to the base of a transistor to drive the LED.
This gives me a square wave centered around 3V or so. Is there a way to create an output that alternates between 0V and some positive value to drive the transistor?
As an aside... This incidentally blinks the CLIP led, so that got me wondering if anyone has exploited that to use for a rate LED.
Code: Select all
;--- Rate indicator
cho rdal, sin1
skp gez, LED_ON ;
sof 0, 0 ; set ACC to zero
wrax dacr, 0 ; LED off
skp zro, END_LED
LED_ON:
sof 0, 0.999
wrax dacr, 0 ; LED on
END_LED:
This gives me a square wave centered around 3V or so. Is there a way to create an output that alternates between 0V and some positive value to drive the transistor?
As an aside... This incidentally blinks the CLIP led, so that got me wondering if anyone has exploited that to use for a rate LED.