In SX Microcontrollers, SX/B Compiler and SX-Key Tool, kd5dhu wrote: [2] Timothy, Put this is your varables section of your program: [b]temp1 VAR BYTE ' subroutine work vars[/b] Redefine your: [b]SEROUTSXB SUB[/b] to: [b]SEROUTSXB SUB 1[/b] Modify: [b]SEROUTSXB: SEROUT TxPin, Baud, char RETURN[/b] to: [b]SEROUTSXB: temp1 = __PARAM1 SEROUT TxPin, Baud, temp1 RETURN[/b] Now replace all of your: [b]GOSUB SEROUTSXB[/b] With [b]SEROUTSXB 13 ' transmits a carrage return[/b] It would be better to define carrage returns or whatever in your constants section like: [b]Cr CON 13 ' ASCII Carrage Return[/b] This way dou dont have to assign char before you call you SUB If you look at some of Jon's examples, that use subroutines, you'll notice that he defines temp1 and others as work variables. These work varables get assigned by the __PARAMx Aliases, see "SX/B Online Help>Reference>Aliases>SX/B Variables" Mike [/2] ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=2&m=95955#m96238 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)