RE:BILL&POOKIE CODE GEN WORK OR NOT FOR ME?
I am trying to use a 16f87x for adc of acs750 lca-050 corrent>voltage sensor, convert the adc to decimal 0.000-50.000, and display it on led/lcd. i want rms values for the current sampling.(1/sec or so maybe) (readable display) i have several pics, several c>v sensors, and very little understanding of the code req'd. i prefer 5 digit display, with leading zero's blanked before dp, dp after 2'nd digit(like this [xx.xxx]) sensor is 0v out for 0amp, 2.5v out for 50 amps. my supply is std +5vdc. kinda new to assembly, seriously interested. i use mplab & mpasm. plan to start with led, then port to lcd after it works. then maybe a volt meter with 50 amp current. should be a very handy instrument. so with that in mind.....bring it on.
what is the calculation to be done to get the digital output of an analog input in an adc in a microcontroller using adc inut voltage,adc reference voltage etc
I am working with the PIC16C745 and I can successfully get a2d to work, but only on 1 channel at a time. Is there a way to switch to a channel, do a single conversion, and then switch to another channel and repeat? When I try this the channels interfere with each other and I get bad results.+
Yes, "channels interfering" is a common problem. I'm pretty sure you have a "settling time" problem. When you switch from one channel to another, you *must* wait a certain amount of "settling time" before starting the next conversion. Please do *all 3* of these: (1) After the code switches from one channel to another, *delay* the full Tacq time, and only then start the conversion. (Typically the ADC routine does: Start ADC, wait for end of conversion, Switch to next channel, Read ADC, Store value. Then return and let the rest of the program go while waiting for this new channel to settle). (2) Buffer your analog signals with an op amp (running off the same power supply as the PIC), so the output of the op amp is directly connected to the PIC analog input pin. And (3) Read the "Analog to Digital" section of the data sheet one more time to make sure I didn't miss anything. -- David Cary
PICList post "LM335" Interesting idea for expanding A2D resolution. +
|file: /Techref/microchip/a2d.htm, 7KB, , updated: 2011/8/19 23:20, local time: 2015/10/7 01:49,
|©2015 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?|
<A HREF="http://www.piclist.com/techref/microchip/a2d.htm"> PIC Microcontroller, Analog to Digital Conversion</A>
|Did you find what you needed?|
PICList 2015 contributors:
o List host: MIT, Site host massmind.org, Top posters @20151007 RussellMc, IVP, James Cameron, Bob Blick, embedded systems, Isaac Marino Bavaresco, alan.b.pearce, Neil, Dwayne Reid, Richard R. Pope,
* Page Editors: James Newton, David Cary, and YOU!
* Roman Black of Black Robotics donates from sales of Linistep stepper controller kits.
* Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters.
* Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated!
* Contributors: Richard Seriani, Sr.
Welcome to www.piclist.com!