In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Zoot wrote: Pretty sweet. Nice doing some ADC w/o too much external circuitry or a dedicated ADC IC. I'm still experimenting with Peter's version which allows for biasing of the input voltage and greater resolution, but with an interrupt rate of 77_000, two 10k resistors and a .01 uf resistor, I get nice stable readings at 8 bits. A 1uf cap didn't give me enough range in the reading; .001 was too smalll. .005 or so would be better, but I used what I had on hand. [code] AdcIn0 PIN RB.2 INPUT CMOS AdcOut0 PIN RB.3 OUTPUT adcVal VAR Byte ' running count of charge/discharge input state adcCntr VAR Byte ' 8 bit "frame" sensed VAR Byte WATCH sensed '... INTERRUPT 77_000 GOTO Interrupt_Handler '... Main: '... GOTO Main '... Interrupt_Handler: '... Read_Sigma_Delta: INC adcCntr IF adcCntr <> 0 THEN adcVal = adcVal + AdcIn0 ELSE sensed = adcVal adcVal = 0 ENDIF AdcOut0 = ~AdcIn0 '... RETURNINT [/code] Now, I have a few other questions. 1. Should I presume that this circuit will be more sensitive to temperature swings and the like than an ADC chip? Ditto that it will be sensitive to tolerances in the resistors and cap(s)? 2. Is there any way to combine pins if I wanted to set up 4 or 6 sigma delta ADCs? I'm thinking not, because I can't see a way around the need for isolating the input and output of each circuit. And if I had that many it would probably be easier to just hook up a multi-channel ADC IC anyway, but in a pinch it would be nice. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=311165#m311981 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)