In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Chet wrote: I think you have a minor spelling error, ICE3 instead of PIC3: Regards Chet ' ========================================================================= ' ' File...... pwidth2 ' Purpose... Trigger a camera shutter ' Author.... Russell Wizinsky ' E-mail.... [url=Russw@professorwiz.com]Russw@professorwiz.com[/url] ' Started...8/1/08 ' Updated...8/18/08 ' ' ========================================================================= ' ------------------------------------------------------------------------- ' Program Description ' ------------------------------------------------------------------------- ' The purpose of the program is to trigger a the shutter of a camera ' dependent on the movement of a remote control for Airplanes / Helis ' Down position will be camera off / standby ' Midstick will be single shot ' Top Stick will be 3 round bursts ' After all camera shots there will be a 1 second delay ' ------------------------------------------------------------------------- ' Device Settings ' ------------------------------------------------------------------------- DEVICE SX28, OSC4MHZ, TURBO, STACKX, OPTIONX FREQ 4_000_000 ' ------------------------------------------------------------------------- ' IO Pins ' ------------------------------------------------------------------------- led1 pin rc.0 output led4 pin rc.4 output led5 pin rc.5 output led6 pin rc.6 output led7 pin rc.7 output Camera pin rb.4 output Receiver pin rc.1 input ' ------------------------------------------------------------------------- ' Constants ' ------------------------------------------------------------------------- PROGRAM Start '------------------------------------------------------------------------- ' Subroutines '------------------------------------------------------------------------ PIC3 SUB CLICKS SUB PIC1 SUB ' Variables ' ------------------------------------------------------------------------- pWidth var byte ' ------------------------------------------------------------------------- ' INTERRUPT ' ------------------------------------------------------------------------- ' Program Code ' ------------------------------------------------------------------------ Start: PULSIN receiver, 1, pWidth IF pWidth > 200 then PIC3 pause 1000 goto start ENDIF IF pWidth >100 then PIC1 pause 1000 goto start ENDIF pause 1000 goto start SUB PIC3 CLICKS CLICKS CLICKS ENDSUB SUB PIC1 CLICKS ENDSUB SUB CLICKS HIGH led4 HIGH led5 HIGH led6 HIGH led7 HIGH led4 PAUSE 100 LOW led4 LOW led5 LOW led6 LOW led7 LOW led4 PAUSE 100 ENDSUB ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=286298#m286318 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)