Hi, all.
I'm visiting a german technical school and we have do start a Project work in February. For the coarse advance planning I would like to have a Basic structure of the Programming with Keil µ-Vison. We already programmed some stuff with µ-Vision, but not deep enough
I would like to read the digitized value of a pressure sensor with a microcontroller, let the Software evaluate it, and show the pressure value on a Display.
so is it possible, to build a Table (like Excel, .csv, etc.) and let the programm compare the Value of the input Port from the microcontroller withe the values in the table and take appropriate pressure value.
Or is there another possibility, do assign the values, so that I can change the assignments quick and easy?
please excuse my bad english.
Thank you in advance!
Jonas
Having a built-in ADC or using an external one is completely irrelevant for the problem.
How can you say that there are no continuous function and no interpolation possible? All ADC by definition has to convert a continuous analog value into discrete digital steps. If the analog value from the sensor changes linearly with the the change of the measured parameter, then you can convert from ADC value to measured unit (or the reverse) with a simple A*x + B formula, i.e. a scale factor and an offset.
For each 10 bar, your AD value increases with just over 7 ticks. You can then convert from ADC value to pressure in bar by the A*x + B formula, since your sensor seems to produce a linear voltage. All you have to do is figure out the offset (corresponding to zero-crossing of the curve) and the scale factor (corresponding to the slope of the curve).
Trying to set up a huge number of if statements - either one for each pressure to convert to ADC value, or one for each ADC value to convert to a pressure - is a huge waste of time.
Hi, I see a lot of users ask for the link to my attachment
But ... my dear friends, please post your minds, repairs and opinions here!
I'm working now on a conversion to Basic (I don't have skills about PC basics yet, as I wrote bee4). I somebody want to do this, my C source is very good and simple and well documented and very easy to understand but very clever I think...