Sign in

username:

password:



Not a member?

Search basicx



Search tips

Subscribe to basicx



basicx by Keywords

Accelerometer | ADC | ADXL | Adxl20 | AVR | BasicStamp | BX-35 | BX28 | BX35 | COM3 | Compiler | Downloader | EEPROM | Electromagnet | GetADC | GP2D1 | GPS | I2C | IDE | Keypad | LCD | LCD+ | MIDI | Motors | Multitasking | Netmedia | Networking | PCB | PID | PlaySound | PWM | Relays | RTC | Servo | ShiftOut | SitePlayer | SPI | Stack | Timer | USB

Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | BasicX | AD convertion problems

Discussion forum for the BasicX family of microcontroller chips.

AD convertion problems - yiwy - May 26 8:24:00 2003

Thank everybody for your answers, I am building my project with
Basicx-24 microcontroller and one Serial 2x16 LCD. This
microcontroller has been working well, but I have a big problem with
the AD convertion. I have used GetADC(integer version) and GetADC(Float version)
funtions, to convert analog to digital signal. But neither GetADC
(integer version) nor GetADC(Float Version) funtions return to the
real value. for instance when I imput 4.2 Volt to pin 18 the out put
is 1023 and this is not real since it should be 879, the ground to
the voltage I am reading is common with the Basicx-24 ground. The
voltage input to the Basicx-24 is 7.9 V and the voltage measured in
the pin 21 is 5.05 V. PLEASE ADVISE ME WHAT THE PROMEM IS, AND WHAT
I SHOULD DO. ...............LOOKING FORWARD TO RECEIVING PROMPT
RESPONSE.............................YIWY





(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )


RE: AD convertion problems - Tom Becker - May 26 11:00:00 2003

> ... when I input 4.2 Volt to pin 18 the output is 1023...

Is pin 18 configured for input? If it is set to either Pullup or 1, you'll
see fullscale from the ADC.
Tom Becker
--... ...--
www.RighTime.com
The RighTime Clock Company, Inc., Cape Coral, Florida USA
+1239 540 5700





(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )

RE: AD convertion problems - yiwy vivas - May 26 12:35:00 2003

Thank a lot for prompt reply,
Mr Tom Becker, in the library saids, "the funtions
GetADC(float version) and GetADC(integer version)do
not need a separate call to configure the pin to
input mode".

Do you think I shuold configure the pin first?, and
what is that funtion?

looking forwars to hearing from you......Yiwy

--- Tom Becker <> ha scritto:
---------------------------------
> ... when I input 4.2 Volt to pin 18 the output is
1023...

Is pin 18 configured for input? If it is set to
either Pullup or 1, you'll
see fullscale from the ADC.
Tom Becker
--... ...--

www.RighTime.com
The RighTime Clock Company, Inc., Cape Coral, Florida
USA
+1239 540 5700 Yahoo! Groups Sponsor
Your use of Yahoo! Groups is subject to the Yahoo!
Terms of Service.

______________________________________________________________________
Yahoo! Mail: 6MB di spazio gratuito, 30MB per i tuoi allegati, l'antivirus, il filtro Anti-spam
http://it.yahoo.com/mail_it/foot/?http://it.mail.yahoo.com/




______________________________
controlSUITE™ software. Comprehensive. Intuitive. Optimized.
Real-world software for real-time control. Details Here!



(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )

RE: AD convertion problems - Tom Becker - May 26 12:55:00 2003

> ... Do you think I shuold configure the pin first?, and what is that
funtion?

Try

Call PutPin(bxPin18, bxInputTristate) or
Call PutPin(18,2)

before the first ADC conversion.
Tom Becker
--... ...--
www.RighTime.com
The RighTime Clock Company, Inc., Cape Coral, Florida USA
+1239 540 5700


______________________________
controlSUITE™ software. Comprehensive. Intuitive. Optimized.
Real-world software for real-time control. Details Here!



(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )