Firing pins using serial lines RTS DTR

J

Jose

Hello:
I'm trying to use a serial port to activate a leds panel playing three
lines. I decided to do this way: one to send the data (RTS), another one to
use it as a data clock (DTR) and another one when the data frame has
finished (Tx with bit stop).

It works fine, but it is not quick enough. I can send about 50 bits every
millisecond using DTR and RTS, and using Windows CE it's worse. Maybe the
problem is in the api EscapeCommFunction, but I'm not sure.

How can I use these lines without any internal process, only to fire pins of
devices?
Should I use a parallel port?

Thanks in advance for your help
Best regards
 
N

Nicholas Paldino [.NET/C# MVP]

Jose,

If you write unmanaged code that uses the EscapeCommFunction, do you
still get the same slowdown? While there is little overhead in calling API
functions through the P/Invoke layer (about 7 extra instructions), it still
can add up, especially if you are running it in a tight loop.

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top