title: Powershell write value to serial port
body: <p>How can I write the value 255 to the serial port in Powershell ?</p>
  
  <pre><code>$port= new-Object System.IO.Ports.SerialPort COM6,4800,None,8,one
  $port.open()
  $port.Write([char]255)
  $port.Close()
  </code></pre>
  
  <p>The output of the previous script is 63 (viewed with a serial port monitor).</p>
  
  <p>However <code>$port.Write([char]127)</code> gives 127 as result. If the value is higher than 127 the output is always 63.</p>
  
  <p>Thanks in advance for your help ! </p>