Maybe I didn't explain it good enough, or maybe I just don't understand what you mean.
a hypothetical scenario - Think of a pic processor with a variable resistor attached, at 4 stages in the sweep from one end of the variable resistor, I need to take a reading of the resistance and store that vbalue in the pic in an eeprom location.
Now everytime the resistor is turned varying the resistance, once the pic sensed the already measuered stored in eeprom values it acts and lights an led for every position.
The main problem other than not having a clue how to go about getting the pic to "recogince and store the initial 4 values, is every pic will be attached to a different variable resistor with no idea what the values are before it is turned on, and at 4 stages the pic must take a reading and store that resistance and again act on that reading tthe next and everytime the resistance is varied, so for example if the resistor is turned 1/4 turn it measures that value and stores it, next time the resistor is turned the pic knows when that preset value is reached, ie when the resistor is in exactly the same position, and lights an led.
Hope that made some sort of sense, If it was a case of one variable resistor with a known value it might be easier, but the variable resistors could be any initial value, which is why the 4 preset values need to be stored in the pic by pressing a button when needed, again ie say the variable resistor is turned 1/4 turn the button pressed and the value of the resistance stored.
Something like that anyway.




Bookmarks