In SX Microcontrollers, SX/B Compiler and SX-Key Tool, HW_to_SW wrote: Folks - I'm a hardware person who is attempting to code on the 48SX. I'm struggling with syntax here, if someone could help me out, that would be great. I'm trying to copy a subroutine that would transmit a byte on my serial port, and I'm getting compile errors on the use of _PARAM1. This is taken from an example code that Jon Williams wrote to read an A/D, the LTC1298. (Here is his code: [url=http://forums.parallax.com/forums/attach.aspx?a=4270]http://forums.parallax.com/forums/attach.aspx?a=4270[/url] (I'm trying to read an A/D as well, the LTC1864. They are very similiar chips.) Here is the sample code I'm copying right into my program: '************************ ' Use: TX_BYTE aByte ' -- transmits one byte to serial port TX_BYTE: temp1 = __PARAM1 ' copy outgoing byte SEROUT TX, Baud, temp1 RETURN '************************ I can see that the _PARAM1 is under the HELP files as a SX/B variable. Why does my compiler freak out on my use of this seemingly straightforward subroutine? It says "INVALID PARAMETER "_PARAM1". I copied the definition of the subroutine: TX_BYTE SUB 1 I'm assuming that I will send it the byte that I want to have transmitted. So what Jon calls "abyte" above is the what I want to have output from my circuit board to my PC's hyperterminal. I'm calling the subroutine as follows: TX_BYTE "H" Sorry if this is super basic. ~ Laura ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=330128 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)