Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

adc conversion

what's the solution for the adc conversion?

  • increase the delay in the program

    Votes: 0 0.0%
  • add any component to the circuit

    Votes: 0 0.0%
  • change the impedance

    Votes: 0 0.0%

  • Total voters
    0
Status
Not open for further replies.

elie

New Member
Hi, i would like to ask about a certain problem occuring with me during the adc conversion..instead of converting 4v for example to the right binary number at the output..i'm always getting an answer at the output less than arounf 0.5v from the real voltage at the input..what's the solution?
 
Hi,

No one can make make a qualified judgement without seeing both your source code and full circuit diagram, you do not even mention the micro or programming code you are using.

Please post them so we can look into your problem more.
 
I am puzzled why the OP thinks this problem, which is specific to his project/program is a topic for a POLL.???

IMHO it belongs in the micro-controllers Forum
 
the pic number is 16F877...this is part of the source code:

A2D_CHANNEL_0
MOVLW B'01000001'
MOVWF ADCON0
CALL A2D_DELAY
BSF ADCON0,GO
BTFSC ADCON0,GO
GOTO $-1
MOVF ADRESH,W
RETURN
 
hi all, in my project i'm using different types of sensors on a multiplexer and they're all going through adc conversion. if the output of one sensor is 4v for example, the microcontroller sends 3.5v after converting it to digital..there's always this gap in the voltage...should i place any voltage buffer after each sensor to prevent this drop down or what?
 
the pic number is 16F877...this is part of the source code:

A2D_CHANNEL_0
MOVLW B'01000001'
MOVWF ADCON0
CALL A2D_DELAY
BSF ADCON0,GO
BTFSC ADCON0,GO
GOTO $-1
MOVF ADRESH,W
RETURN

You're only showing a tiny part of the code, and if you're only reading ADRESH then (depending on the setup) you're only reading the top two bits.

Check my analogue inputs tutorial.
 
yes i'm only interested in the highest 8 bits and i want to neglect the least 2 signigicant bits since the encoder connected to the microcontroller can only read 8 data bits and not 10
 
hi all, in my project i'm using different types of sensors on a multiplexer and they're all going through adc conversion. if the output of one sensor is 4v for example, the microcontroller sends 3.5v after converting it to digital..there's always this gap in the voltage...should i place any voltage buffer after each sensor to prevent this drop down or what?

What multiplexer are you using ?
 
yes i'm only interested in the highest 8 bits and i want to neglect the least 2 signigicant bits since the encoder connected to the microcontroller can only read 8 data bits and not 10

But you've shown no code to suggest that's what you're doing - it's useless posting only what you have.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top