In SX Microcontrollers, SX/B Compiler and SX-Key Tool, RS_Jim wrote: I seem to be struggling to get the comparitor function to work. I am feeding pin B2 with a pulse that varies from 1.8 to 2.3 volts and feeding pin one with a voltage divider that gives me aproximately 2.1 volts. I initialize the SX as follows: CMP Con $08 CmpEN $00 Mode CMP Mov !RB,CmpEn I connect B6 to B0 with a resister and then monitor B6 in an interupt service routine. Do I have to continue issuing the Mode and Mov !RB instructions or is once enough? I am not getting the pulse to come through even though I can feed the same pulses through a 741 OP am and get it to work as a comparitor. I need to use the compare function to eliminate some noise on the incoming pulse that is causing false triggering in the software. Thanks JIm ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=406225 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)