In SX Microcontrollers, SX/B Compiler and SX-Key Tool, tdg8934 wrote: I have taken the SX/B Help file on the 4x4 keypad and have a working version of it that uses an old Radio Shack 3x5 keypad. When a key is pressed it displays the digit on the 7 segment LED display. All of this was done on my Professional Development board and done fairly easily. However, I have modified it to TX the character code out (SEROUT) to another SX28 and RX it in (SERIN). After doing a WATCH for the RX variable I see that it is represented by a: 128 decimal (for a 0), 129 (for a 1), 130 (for a 2), 131 (for a 3), 132 (for a 4), 133 (for a 5), 134 (for a 6), 135 (for a 7), 136 (for a 8), 137 (for a 9), 138 (for a A), 139 (for a B), 140 (for a C), 141 (for a D), 142 (for a E) I would think that I am sending out ascii characters and Im not sure why the SEROUT wants to start at 128 instead of an ASCII '0' code or something like I would think. When sending them out: [code] Main: theKey = GETKEY ' get a key IF theKey < 15 THEN ' was a key pressed? READ ReMap + theKey, theKey ' yes, remap keypad READ Digits + theKey, LEDs ' output to display [b]TX_Byte theKey[/b] DELAY 100 ENDIF GOTO Main ' ------------------------------------------------------ ' Subroutine Code ' ------------------------------------------------------ ' Use: TX_BYTE theByte {, repeats} [b]TX_BYTE: [/b] temp3 = __PARAM1 ' save byte IF __PARAMCNT = 1 THEN ' check for repeats temp4 = 1 ' set repeats to 1 ELSE temp4 = __PARAM2 ' get repeats from user ENDIF SEROUT Sio, Baud, temp3 RETURN [/code] Then when I receive it with something like this: [code] Main: DataChr = RX_BYTE ' wait watch DataChr break Goto Main [code]RX_BYTE: SERIN Sio, Baud, tmpB3 RETURN tmpB3 The Watch Datachr shows 128-141. Is this correct? [/code] ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=181142 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)