In SX Microcontrollers, SX/B Compiler and SX-Key Tool, blkirk wrote: I'm kinda new to SX/B and was hoping there's a way to pass pins to a subroutine. I've tried it a couple different ways, but run into compiler errors. I tried both acting on __PARAM1 directly and passing to a temp VAR, but it doesn't seem to fit into Bit or Byte. What is the internal shape of a pin definition? For example there are four LEDs: blue VAR RB.4 red VAR RB.3 green VAR RB.2 white VAR RB.1 FADEIN SUB 2 ' pin name and speed FADEOUT SUB 2 ' pin name and speed FLICKER SUB 2 ' pin name and duration start_point: FADEIN blue,50 FADEOUT white,10 FADEIN green, 100 ' the end FADEIN: for COUNT = 0 to 250 pwm __PARAM1, COUNT, __PARAM2 next __PARAM1 = 1 ' leave it on RETURN ' Or perhaps? FADEIN: TEMPPIN = __PARAM1 ' what kind of data am I ? for COUNT = 0 to 250 pwm TEMPPIN, COUNT, __PARAM2 next __PARAM1 = 1 ' leave it on RETURN PS: As a side note... anyone used SOUND to simulate a heartbeat? Thanks. --Ben ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=129908 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)