Jump to content

Check out our Community Blogs

Register and join over 40,000 other developers!

Recent Status Updates

View All Updates

- - - - -

Resistor Standard value

resistor standard value

This topic has been archived. This means that you cannot reply to this topic.
No replies to this topic

#1 Pavle


    CC Lurker

  • Just Joined
  • Pip
  • 1 posts

Posted 26 October 2016 - 02:10 PM

I made application on C# that converts resistor value to colors.I want to show closest standard value and to show color of closest standard value when checkbox is checked?

How to do this:
First I should select the resistance-row (E6 , E12 , E24 , ...).
According to this selection I get the base-values for the row - for example E12 means 1.0 , 1.2 , 1.5 , 1.8 , 2.2 , and so on.
Now I should calculate the row-multiplier. For example if I Input 1344 Ohm multiplier for the base-values is 1000.
Than I should take this multiplier, iterate through the row-values and multiply those value with the multiplier and compare if one value is smaller (or equal) than your entered resistor-value.
Now I should check, which difference is smaller : to the last value of the row or to the next value of the row. The one with the smallest difference should be my reference-resistor.

With this resistor-value I should build color-table and not each resistance-row has the same count of color-rings.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download