public void set_pwm_f(short frequency) throws IOException {
      byte[] data=new byte[2];
      data[0]=(byte)SET_PWM_F;
      data[1]=(byte)frequency;
      byte[] result = this.sendAndReceive(data, COM_TIMEOUT, 1);
      if (result.length==0) throw new IOException("no answer from device");
      if (result[0]!=0) throw new IOException("device error: "+result[0]);
    }