Type these variables at the top of your form Dim in_data As String Dim sData As Byte Type this instruction in the Form load event CheckForIllegalCrossThreadCalls=False Add the following code to your form Private Sub SerialPort1_DataReceived(ByVal sender As System.Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles SerialPort1.DataReceived Do in_data = SerialPort1.ReadLine() Loop Until in_data = "TX" in_data = SerialPort1.ReadLine() TextBox1.Text=in_data SerialPort1.ReadExisting() SerialPort1.WriteLine("!" & vbLf & sData) End Sub Use as many buttons as you like to assign a value to sData, in the Button_Click event type sData=any value you like between 0 and 255 For the Stamp use this code dir VAR Byte pulseCount VAR Byte x VAR Byte x=83 DO SEROUT 16,16780,["TX",10,DEC x,10] SERIN 16,16780,15,timeout,[WAIT("!"),DEC3 dir] timeout: IF (dir=1) THEN FOR pulseCount = 0 TO 50 PULSOUT 13,650 PULSOUT 12,850 NEXT ENDIF LOOP