Forgot your password?
iragdoll, October 20, 2010 in General
I type slow
That's okay, I can't read fast.
GG with your answers here, BTW.
Okay, How do I know if I am reading the voltage correctly?
Apply different voltages to the ADC by using different resistor values connected to vcc.
EDIT: Try connecting to ground too
Hmm, you'll need to know the basics of an ADC, instead of us holding your hand. Lets see, a couple of simple questions(select the right one) and you should know the answer to your question after that:
1) Whats the range of the MSP430 ADC in volts.
a) 0 to 10V
0 to 5V
c) 0 to 3V
2) After making a conversion, what is the range of ADC register values
a) 0 to 65535
0 to 1023
c) 0 to 255
edit: Slower than you, NTM.
As far as I know, for number two, you can constrain the values any way you want. I have seen both 0 to 255 and 0 to 1023 used.
I'm pretty sure the ADC just returns 0-1023 (10 bits). You can convert it to any range you want in code. The map() function you asked about earlier just changed the 0-1023 to 0-1000.
Thats correct for 1)
For 2), the reason it goes between 0 and 1023 is because the MSP430G2231 has a 10bit ADC.
2^10 = 1024 steps which results in values from 0 to 1023.
If it were an 8 bit ADC, it would range from 0 to 255 or 256 steps.
Now, to check if your ADC is working properly, a simple test would be:
1- Connect the ADC pin to 3V - the val should read 1023
2- Connect the ADC pin to GND - the val should read 0V
3- Connect the ADC pin to 1.5V - the val should read _____?
Im actually having trouble reading val... once second please.
Yea I am really confused man... I think Ill need some serious help please. Any help?
The problem is I cant read the voltage levels on the Local Debug window. It keeps saying 86...
Do you know how to look at the contents of a register with the debugger?
Dude you are going to be ALL RIGHT!
Man I dont think so... I need to get this working by tomorrow... I underestimated the complexity of MSP430 Programming. I made tons of projects with the Arduino, but the LaunchPad coding is much more confusing...
Yea I know how to read it, sort of. Can you guys sort of edit the code and I will test it out and sort of guide me through it?
Well, how much is it worth to ya?
Like money wise?
You need to be a member in order to leave a comment
Sign up for a new account in our community. It's easy!
Already have an account? Sign in here.