The MAX186ACPP+ Is now done the problem is fixed (Re-Named)
sam_sam_sam
Posts: 2,286
Thanks To Any One that has a Demo Code that they are will to share this is for a BS2 only
Or is there ADC chip that Parallax sells that would be the same that there is a Demo code for it
Here is the Data Sheet····· http://datasheets.maxim-ic.com/en/ds/MAX186-MAX188.pdf
I used the MCP3202 Demo.bs2·for most of the code
Thank Mike Green for your help
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any··that you may have and all of your time finding them
·
·
·
·
Sam
Post Edited (sam_sam_sam) : 1/11/2010 11:44:01 PM GMT
Or is there ADC chip that Parallax sells that would be the same that there is a Demo code for it
Here is the Data Sheet····· http://datasheets.maxim-ic.com/en/ds/MAX186-MAX188.pdf
I used the MCP3202 Demo.bs2·for most of the code
Thank Mike Green for your help
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any··that you may have and all of your time finding them
·
·
·
·
Sam
Post Edited (sam_sam_sam) : 1/11/2010 11:44:01 PM GMT
Comments
To learn how to use them
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any··that you may have and all of your time finding them
·
·
·
·
Sam
Thanks for the Info I will give this a try
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any··that you may have and all of your time finding them
·
·
·
·
Sam
The Voltage Range on this chip 0 to 4.0 volts
ALL of·The Inputs need to have at least a 10k ohm resister tie to·( AGND· pin 13 ·) for it to work right
If you do not want the voltage reading to jump around then put a .1uf on the input pins·to ( AGND· pin 13 ·)
The line of code that say
Cnts2Mv········ CON···· $0139···················· ' x 1.22 (To Millivolts)·· This for the MCP3208
need to be change to
Cnts2Mv········ CON···· $00FE···················· ' x·245 (To get ·Millivolts)··This for the MAX186
············ ·' ADC Definitions
············· ' x's··· Denote channel# [noparse][[/noparse]%1XXX1101]
············· ' channel_0······ CON···· %10001101
············· ' channel_1······ CON···· %11001101
············· ' channel_2······ CON···· %10011101
············· ' channel_3······ CON···· %11011101
············· ' channel_4······ CON···· %10101101
············· ' channel_5······ CON···· %11101101
············· ' channel_6······ CON···· %10111101
············· ' channel_7······ CON···· %11111101
············ ·'·This ·Select CH0, Single-Ended [noparse][[/noparse]%1---1X01]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any··that you may have and all of your time finding them
·
·
·
·
Sam
Post Edited (sam_sam_sam) : 1/12/2010 11:25:49 PM GMT
Here is the Problem the Volt·Meter reads 1.225 The Max186 reads 1.335 with the Basic Stamp
How do I adj the reading that the MAX is giving the Basic Stamp Code wise
I·have·ADJ this value·to··· Cnts2Mv·· CON···· $00F6·· ' x··245··· Which fix the problem·
The problem was me the way that I was doing the HEX·#··as a decimal # not as a HEX #
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any··that you may have and all of your time finding them
·
·
·
·
Sam
Post Edited (sam_sam_sam) : 1/11/2010 11:41:00 PM GMT
One is an offset, which means the reading is always off by a specific amount. That is it always reads high by the same amount ( 0.11V if that is the problem in this case). The fix for that is to subtract the offset from the reading.
Another is a gain or reference difference, which produces a reading that is always off by a certain percantage. That is if it is off by 0.01V at 1V it will be off by 0.02V at 2V. If that is the case you need to multiply the reading by a correction factor ( 1.225 / 1.335 or 0.9176 if that is the problem in this case).
It is possible to have to correct for both an offset and a gain or reference difference. To do the calibration correctly you should take readings at the low end ( 0V ), mid range, and upper end.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any··that you may have and all of your time finding them
·
·
·
·
Sam