In SX Microcontrollers, SX/B Compiler and SX-Key Tool, PJ Allen wrote: OK. Well, I copied over the 1.51.03 stuff (but now I don't have Help anymore, except the PDF, the .chm doesn't work.) I re-wrote, a bit, the previous, and this Compiles: [code] DEVICE sx28, oschs3, TURBO, STACKX, OPTIONX IRC_CAL IRC_SLOW FREQ 10_000_000 PROGRAM Start a VAR Byte start: TRIS_A = %00000001 'RA.0 analogin's input 'RA.1 analogin's output 'RA.2 Result Indicator 'RA.3 Acquisition annunciator Inpin PIN RA.0 INPUT CMOS Testing: RA.2 = 0 RA.3 = 0 ANALOGIN Inpin, RA.1, a, 2 IF a > 150 THEN Good 'Threshold appx 2.9V RA.3 = 1 'indicates acquisition PAUSE 2000 GOTO Testing Good: RA.2 = 1 RETURN No ENDIF needed. I guess the THEN can't be to a "RA.x = _" like I had, so I made a "Good" subroutine to turn the "> 150" LED on with. I don't have any SX48s, only SX28s. So, it'll be a bit till I can get the circuit together and all, but that's what I'll be doing.[/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#m245562 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)