Searching \ for '[PIC]: Scotts Sigma Delta Code Question' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/microchip/devices.htm?key=pic
Search entire site for: 'Scotts Sigma Delta Code Question'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: Scotts Sigma Delta Code Question'
2001\03\03@174902 by Les

flavicon
picon face
Hello Scott

I've been trying to make your code for the Sigma Delta ADC work. But I seem
to be getting a value of 2048 for 0V and 4096 for 2.5V. Is this the correct
operation of your code?

I've tried varying the resistor values to no avail.I also tried an op-amp
buffer in case the impedence on the imput was too low.

What I'm trying for, is a 12-bit value for 0-5Volts.

I've quadruple checked the code and it's exactly as in your ASM file.#

Any pointers would be appreciated. I'm probably doing something obviously
wrong.

Thanks
Les

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\03\03@203604 by Scott Dattalo

face
flavicon
face
On Sun, 4 Mar 2001, Les wrote:

> Hello Scott
>
> I've been trying to make your code for the Sigma Delta ADC work. But I seem
> to be getting a value of 2048 for 0V and 4096 for 2.5V. Is this the correct
> operation of your code?
>
> I've tried varying the resistor values to no avail.I also tried an op-amp
> buffer in case the impedence on the imput was too low.
>
> What I'm trying for, is a 12-bit value for 0-5Volts.
>
> I've quadruple checked the code and it's exactly as in your ASM file.#
>
> Any pointers would be appreciated. I'm probably doing something obviously
> wrong.

Could you provide a simple ascii schematic of your input? It should look


                   +-----------> PIC (not used in 1-pin version)
                   |
Vin  o---/\/\/\---+-+-/\/\/\----< PIC
         R1      |     R2
                === C1
                 |
                ---
                ///

If R1 equals R2, you will not get the full 0-5 V range. Think about the extreme
case. If Vin is 5V, and the PIC output (the lower I/O pin) is always low, then
the voltage on C1 is 2.5 volts. This is a fair amount above the PIC's input
threshold. Increasing R1 increases the Vin range. A resistor to +5 (and
C1) provides a positive offset. This is useful for measuring negative voltages.

As Alice pointed out, using a source derived from a potentiometer just doesn't
work (unless the pot has a very low resistance when compared to R1 and R2).

Scott

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\03\03@212037 by Les

flavicon
picon face
I'm no good at ASCII art, so I'll describe the input interface..

I first tried a pot on the input, with R1 and R2 10K and C1 0.1uf. The
result is 0V-2048 and 2.5V-4096.

I then tried a standard rail-to-rail op-amp as a non inverting unity gain
buffer. With a pot supplying the voltage to it's input and the output going
to R1. Again, I cannot get a reading of 0 for 0Volts, it stops at 2048.

But, if I attach the op-amp (or indeed, the POT, directly to C1, I get a
reading of 0 to 4096 for a voltage of 0 to 2.5. I just cannot seem to get a
swing of 0 to 5 giving a value of 0 to 4096.

Thanks
Les

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


More... (looser matching)
- Last day of these posts
- In 2001 , 2002 only
- Today
- New search...