In SX Microcontrollers, SX/B Compiler and SX-Key Tool, g_daubach wrote: Kevin, IMO, the detection should work with a relatively low level on the audio line, as the comparator reacts on the voltage difference between the rb.1 and rb.2 pins. Let's assume, you adjust the potentiometer for 0.5V between Vss and rb.2, the comparator output will change its state when the rectified and filtered audio signal betwwen Vss and rb.1 exceeds 0.5V by some Millivolts. The SX28 data sheet specifies the typical minumum input offset voltage as +-10mV for an input voltage in the range from 0.4V to Vdd-1.5V. So when the rectified and filtered audio signal at rb.1 is 0.5V or more, you are in good shape. Use the potentiometer to adjust the minimum audio level that shall be interpreted as valid audio signal. When using an SX48, there are some differences concerning the MODE register (besides other differences). Instead of mode $08 in my previous example, you need to use the instructions mov w, $18 mov m, w instead. Are you planning to write your application in assembly, or in SX/B? When using SX/B, the compiler will handle the differences between the SX28 and the SX48. As I'm not too experienced in SX/B, maybe someone else can bail in with a demonstration how to deal with the comparator in an SX/B application. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=149297#m150270 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)