Gerhard Fiedler wrote: > Dennis Crawley wrote: > >> A VB application can activate DTR or RTS. Does anybody knows how >> can be measured the delay between DTR or RTS enabling and the real >> 1 or 0 in the data line? > > You can feed it back (hardware connection) into CTS and measure the > delay between activating RTS and reading the change from CTS in > software. > > Or you can write a software that feeds CTS through to RTS and > measure the delay between activating CTS and reading the change in > RTS in hardware. > > Both give you a worst case figure. Real figure is probably smaller, > maybe half. > > Depending on the timing precision you need, VB may not be such a good > choice. It's not known for defined realtime behavior. > > Gerhard Thank you Gerhard. Can you suggest another control or dll to work around? A 10 Bytes packet is sent to a microcontroller. The micro has to replay with another packet. The communication is established at 4800bps Max. Perhaps is gone to be a smaller bps. Since a RF TX module (wen shing) is used to transmit and an RX module is used to receive, the DTR line is used to change the antenna from TX to RX modules and viceversa, via reed relays. Suggestions and experiences are welcome. I've set the 1ms VBtimer to switch on and off the DTR line. With a scope, the latency measured was 55ms. I think is computer processor velocity dependent. But I don=92t have a lot of computers with window98 to demonstrate it. Then I've tried a do loop in a form_load event with this code: mscomm1.rtsenabled =3D not mscomm1.rtsenabled I've got better latencies, 85us!,... until the mouse is moved or whatever application is opened! Perhaps I must go for another control or dll. Anyway thanks for your time. Dennis Crawley www.geocities.com/proyectosenpic -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist