In SX Microcontrollers, SX/B Compiler and SX-Key Tool, PJ Allen wrote: It isn't clear to me that RA.0 is made an INPUT and/or RA.1 is made an OUTPUT if they get declared as such before the PROGRAM directive (or if that matters, but I think it must.) Will this Compile and Run -- [code] DEVICE SX48, OSC4MHZ FREQ 4_000_000 PROGRAM Start Start: 'TRIS_A = %00000001 a VAR Byte InPin PIN RA.0 INPUT CMOS OutPin PIN RA.1 OUTPUT Led1 PIN RA.2 OUTPUT 'Result Indicator Led2 PIN RA.3 OUTPUT 'Acquisition annunciator Testing: Led1 = 0 Led2 = 0 ANALOGIN InPin, OutPin, a, 1 IF a > 150 THEN LED1 = 1 'Threshold appx 2.9V Led2 = 1 'indicates acquisition PAUSE 2000 GOTO Testing [/code] ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=2&m=244365#m245313 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)