在Windows上使用lisp进行串行通信

时间:2014-01-06 12:12:04

标签: windows serial-port lisp

我打开了两个用(19200 8-N-1)规格表示的端口。

使用软件“虚拟COM端口”,我通过NULL-modem连接COM8和COM9。

这是我的Lisp代码:

(require "serial-port")
(require "com")

(setf ser-port
      (serial-port:open-serial-port "COM8" :baud-rate 19200
                                    :data-bits 8 :stop-bits 1 :parity :none))

(with-open-file (com8 “COM8”
                      :direction :output
                      :element-type 'unsigned-byte)
  (write-byte 65 com8))

然而,我没有在COM9进行任何沟通。

当我尝试从MATLAB(在MATLAB中启用COM8)向COM9发送数据时,我很成功。

请提出任何建议?

0 个答案:

没有答案