
B.Noll
Members-
Content Count
9 -
Joined
-
Last visited
About B.Noll
-
Rank
Noob Class
Profile Information
-
Gender
Male
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
#include "inc/lm4f120h5qr.h" #include "inc/hw_types.h" #include "driverlib/gpio.h" #include "driverlib/sysctl.h" #include <inttypes.h> // ---- PORTF Launchpad 5x GPIOs (PF0 - PF4) ---- /* PORTF PIN Default Func. Connect@ Description PF0 28 NMI PIN0 SW2 Non-Maskable Interrupt PF1 29 GPIO PIN1 RGB LED (Red) By Default standard GPIO PF2 30 GPIO PIN2 RGB LED (Blue) "" PF3 31 GPIO PIN3 RGD LED (Green) "" PF4 5 GPIO PIN4 SW1 "" */ __n
-
There is no need to use these formulas as there is a more simple way to do such conversion. Simply get the ADC Value for 2 exact temperatures like 0 Celsius and 37 Celsius so we can use Ice as a reference and the temperature of our body :-) then make the equation. I have attached a code that I wrote a while ago, find it attached. Sorry that the comments are in German but I guess the code is so simple that you don't need a translation. msp430x2xxTemperatur.c
-
I agree. If you want to get a precise result then you should use a better ADC. In the given example oversampling does a good job. If you add noise to the input signal then you can get an extra BIT without any problem but If you have a perfect input signal then you are right. The noise is the key point here.
-
Mh, intersting discussion :-) Ok, let's take a 2 BIT ADC and let's assume a range of 0-4 V. The result we get: ADC Value 0V + | 00 | | 1V + | 01 | | 2V + | 10 | | 3V + | 11 | | 4V + So the ADC will divide the range from 0-4 V in 4 portions, each has a range of 1V. The key point is how many different numbers can be generated by 2 BIT's and that's exactly
-
Hi Rob, I don't think so as I already explained before the resolution we can get is 2.5V / 1024 = 0.002441 Volt = 2.44 mVolt. For a 4 digit DMM you need a resolution of 1 mVolt so we need oversampling here. Lets have a look at your explanation... 2500/1023 is wrong even if you find such an example calculation in some data sheets. You have to count the 0 as well. Example: 0000000000 is your 1st return code from a 10 BIT ADC 0000000001 0000........... 1111111111 is your last so from 0 - 1023 = 1024 and your calculation is correct :-) The maximum return value is 1023 but th
-
Rob, I followed the given link but to be honest, I can not see any error correction at all. Of course and my example shows how to do it in a very effective way by also getting a 12 BIT result + Filter.
-
Hi Rob, you didn't check the given code, I do not make use of floating point. I found an example that did it but of course it make no sense at all. I do all corrections by fixed point arithmetic and simple shift operations. Bernd
-
Hi Mike, I use IAR EWB but inttypes.h belongs to the standard library so you should have it somewhere. http://en.wikipedia.org/wiki/Inttypes.h Have a look.
-
While searching an ADC samplecode for the g2231 I found one that made use of the floating point lib to get an accurate reading of the ADC return value. As the g2231 is a 2k chip that is a silly thing to do. The goal for the code was to get an accuracy that is similar to a 4 digit DMM. Ok, let's think about this. When using the internal reference (2.5V) the resolution we can get is 2.5V / 1024 = 0.002441 Volt. We can see that the last digit will jump because 10 BIT is not enough. Ok, let's try the 2nd reference with 1.5V / 1024 = 0.001468. Not to bad but still not good enough. Also I'de lik