Re: Can you help me to explain a question about serial port and resolve the problem.



You shoud not change settings of the serial port while you transmit data or
expect received data. At 2400 bps, it takes 4 ms just to send one byte, only
then you should change your settings.

Since you have to switch parity for the received byte, I'm not sure this
will reliably work at all, because there is no guarantee whatsoever that
you'll be able to do it in time, before the device will start sending data.
Your best bet is to send data from COM1 and receive it through COM2,
providing the special wiring for your setup.

"youhow" <youhow@xxxxxxx> wrote in message
news:1140228843.838654.105140@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thanks Pavel A.

I'm not good at English, hope I have explained my question clearly.

In chips side, they are identified by CHIP NUMBER and MARKPARITY
command sent from computer, the designated chip returns after 10 ms
without receiving followed CMD and SPACEPARITY command from computer.

I have to insert Sleep(n ms) between II and III, or the program can not
receive any bytes from the chip microprocessor. Although I have
inserted Sleep(n) between II and III, the program occasionally fails to
communicate with chips.

I have tried to use IOCTL_SERIAL_GET_DTRRTS to capture the change of
RTS status to detect whether serial port hardware buffer was empty, but
the communication still failed without insert Sleep(n).

I want to know the reason why I should insert Sleep(n), is it correct?
and How to make the communication 100% successful.

Thanks again.



.



Relevant Pages

  • Re: DAQ Circuit Diagram for Matlab
    ... this sampling must be performed over a serial port, ... Another method is to use a UART chip, ... As far as reading the signals that the device is sending to the PC, ... The TLC548 ADC chip needs a pulse train for the i/o clock. ...
    (comp.soft-sys.matlab)
  • Re: why cant i write to a file with this code?
    ... Can't really say without knowing the format of the data that your hardware device sends through the serial port. ... You are assuming that your readstatement always returns a single chunk, or a packet, from your hardware device. ... The Linux kernel has absolutely no idea, nor does it care, what you have attached to the serial port, and the format of the data you are receiving. ...
    (comp.os.linux.misc)
  • Re: which one among the available FPGAs is best for a fresher?
    ... I believe US next day carriage will drop to ... a bigger chip that the standard starter kit has. ... the serial port but I've never bothered -- I suspect it's ...
    (comp.arch.fpga)
  • Re: Will Windows 7 be a laptop upgrade nightmare?
    ... keyboard and receiver that used the serial port. ... DOS but failed under later copies of Windows. ... But on second thought, you said you're sending and receiving Morse code; that sounds pretty time critical, which emulators are not. ...
    (comp.sys.laptops)
  • Re: i2c chip connected through USB port / Serial converter ttyUSB0 --Linux 2.6.17
    ... Is there a driver to communicate through the serial port to the i2c ... Is it some kind of FTDI chip? ... fact so called virtual com drivers which emulate a serial port over USB. ...
    (comp.arch.embedded)