Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

PIC16F877A or PIC16F876A ADC question

Status
Not open for further replies.

glenjoy

Banned
Advanced Member level 3
Joined
Jan 1, 2004
Messages
962
Helped
72
Reputation
146
Reaction score
20
Trophy points
1,298
Location
Philippines
Activity points
0
pic16f876a tutorial

Hi,

I am planning to measure a negative analog signal say -4.5V, because my analog input swings from -4.5V to +4.5V, how can I do this with a PIC16F877A or PIC16F876A?

Thanks.
 

pic16f876a adc

Assuming you are using a 5 Volt power supply for the Pic and that is your A/D ref. You could feed the analog input to an op-amp configured as an attenuator, so that it swings +-2.5 Volt, and bias the op-amp so that it sits at 2.5 Volt for 0 Volt input.
 
  • Like
Reactions: akra

    glenjoy

    Points: 2
    Helpful Answer Positive Rating

    akra

    Points: 2
    Helpful Answer Positive Rating
pic16f877+operational amplifier

Hello,

I would try to put a first 4.7k resistor between the Vref and the analog input, and a second 4.7k resistor between the analog input and the signal that you want measure.

Vref could be 5V.

5V input give 0x3FF, 0V input give 0x200 and -5V input give 0x000.

Telga
 

microchip 0~10v adc

the safe methot is use an opamp for level shifting
 

pic16f877a analog inputs

My question are:

1.) Is there an ADC that can accept an analog input of -4.5V to +4.5V.

2.) What is that ADC.

3.) Is it possible for the PIC16F877A to accept those values?
 

pic16f876 tutorial

Hello,

@maneco

I do not agree with your opinion because my method respects completely the microchip specification. So I think that it is a good way to obtain the required function.

If you do not agree, could you please explain why ?

@glenjoy

1) This kind of converter exists.
2) For example, ADS7808.
3) The problems are : the ADC was not designed for this job and the clamping diodes are connected to vcc and to gnd. One solution is described in my previous post.

Telga
 

pic16f876 adc

Hello Glenjoy,

There are plenty of ADC's that will take a +/-5V signal, for example:

MAX127 **broken link removed**

This is a little overkill, it will read 8 channels at 12-bit resolution, software selectable 0-5V, 0-10V, +/-5V or +/-10V scaling and an i2c interface to talk to the PIC. It comes in a nice 24-pin DIP package for easy prototyping. Maxim may even send you a couple of free samples to play with (they sent me some).

The easy solution though is the opamp (don't know about the resistor method, it might load your source too much if it is high impedance).

FoxyRick.
 

pic16f877 adc tutorial

use external ADC or co:parateur just to get a sign of signal

Added after 27 seconds:

use external ADC or comparateur just to get a sign of signal
 

adc 16f876a bit

You can made (with OP amp) circuit that making apsolute value from input voltage(see picture). Then you measure this voltage, and with one more OP amp (with hysteresis) you detect when your voltage is negative (output of op amp connect to port pin).

Regards,



Mr.Cube
 

pic16f877a attenuator

Hi,

I've a similar problem, but my input wave are simetric, so I only need to measure the positive part, and cutted with a schottky the negative part.

HH

NeuralC
 

pic16f876a a/d converter tutorial

I have a harmonic project that needs lareg inputs at max for +&- 410V so I can't get it into the pic so we have to to use a voltage divider and opamps attenutors to decrease it to 5V....

But the pic don't accept -ve voltages so you can attenuate it to 2.5V and shift it by 2.5....

Don't forget to care of the negative inverting opamps effect.
 

a/d conversion pic16f876

Hi,

well, i m using PIC 16F877A and trying to implement comparator hysteresis in C coding as i've not to use an internal or external comparator module how can i get it. could any one plz help me
 

pic16f877a comparator

have two switching levels, one at say 1 volt and one at 0.8 volt. It swiches one way when the input is greater than 1, and switches the other when it is less than 0.8. the hysteresis is the 0.2 volts.
 
  • Like
Reactions: houria

    houria

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top