In SX Microcontrollers, SX/B Compiler and SX-Key Tool, ERICW wrote: Here is the code for a DC digital voltmeter using an analalog devices ADC 654. There are 3 scales selectable by a rotary switch. The rotary switch does 2 things. 1) It communicates with pins on the SX telling the program what scale the meter is on. 2) It connects the probes across no voltage divider, or one of two voltage dividers. The ADC is configured at 1.00 VDC a frequency of 100KHZ. There are 3 scales 1, 10, and 100 VDC. The 1 volt scale uses no divider, basically just probes connected to the ADC. On other scales a voltage divider is used to convert 10VDC to 1VDC or 100VDC to 1VDC, where the divided signal is sent to the ADC. The program calculates tenth volts and displays on a 4 digit multiplexed display. This program is in its early stages and needs many improvments. It is configured to run on a 50 MHZ external resonator which is required for the count command to count at the required speed. On the 1 volt scale it is accurate to +_ .1 volt which gets magnified some on higher scales. I am working on this and believe it to be correctable as a configuration on the ADC. Look at the analog devices website an there are schematics and sample circuits. As far as my circuit I have no schematic yet. It will drastically change as I am now altering it to measure AC as well as DC. Some of my comments on the program may no longer apply due to some changes. The ADC is configured using a timing capacitor and a few resistors. By chosoing the values properly you can get a specified frequency at a wide range of full scale voltages. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=278052#m279637 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)