In SX Microcontrollers, SX/B Compiler and SX-Key Tool, WMcKILLemALL wrote: JPH I think Your Idea of using the ADC0831 is the way to go. Like JonnyMac suggested, A simple voltage divider in front of the input to the ADC0831 would do the trick.( reduce 12volts down to 5volt TTL) The ADC0831 has some really good resolution, So scaling 12volts down to 5volts shouldn't be a problem. A simple 10kpot with a current limiting resister will divide the 12volts down to 5 volts (by adjusting the pot) in Your test setup to the ADC. This could be replaced with simple fixed resisters after You have tweaked the circuit, for a production run. I would use another voltage divider for the 24volt signal and use the comparator pins on the SX28.( pins RB.0,RB.1 and RB.2 ) I would also make sure that all voltage dividers DO NOT exceed 5volts on their outputs before I hooked them to any component!, along with 5 volt zener diodes in My test bed to help insure I don't ZAP anything. I know this might sound complex but its just for the test and setup mode.Once a setup has been debugged the components can greatly be reduced. The specs for the ADC0831 can be found on the Parallax home page/store. its a PDF. _____________$WMc%__________ ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=348093#m352494 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)