Hi, Pedja ...
you just redraw the TL431 !!!
just have a look to its " OFF " state current ... : Off-State Cathode Current IK(off) VKA = 40V, VREF = 0 typ 0.26 max 0.9 µA
Alain
Hi, Pedja ...
you just redraw the TL431 !!!
just have a look to its " OFF " state current ... : Off-State Cathode Current IK(off) VKA = 40V, VREF = 0 typ 0.26 max 0.9 µA
Alain
Last edited by Acetronics2; - 5th December 2020 at 20:49.
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Sorry for that...
Back to the original challenge, I'd do it in software:
The above snippet will deliver <128 results as soon as ADC > 128. I don't think that's what you want. So we have to add a filter:Code:IF ADC > 127 THEN ;Assuming 8-bit ADC ADC_VAL = (ADC * 4) / 5 ;Yields 80% of value ENDIF
Code:IF ADC > 127 THEN ;Assuming 8-bit ADC B0 = ADC - 127 ;Use a temporary variable to determine how much above 128 our result is B1 = (B0 * 4) / 5 ;Get 80% of only the amount > 128 ADC_VAL = B1 + 128 ;Yields mid-point + 80% of overage ENDIF
Last edited by mpgmike; - 10th December 2020 at 05:27.
Bookmarks