Hello:
I've been trying to use a serial port to fire pins connected to a electronic
device using RTS and DTR lines but it's too slow in Windows CE.
So I would like to test using a parallel port, but I can't find information
about that.
How can I fire a specific data line of parallel port in Compact Framework?
Where I can find information about that?

Thanks in advance
Best regards

Re: Parallel Port to fire pins by Paul

Paul
Tue Oct 05 10:20:02 CDT 2004

Does your device even have a parallel port? What device are we talking
about? If serial changes to the RTS and DTR lines are too slow, there's no
reason to suspect that parallel would be any different.

Have you tried this in unmanaged code? That has more potential to work
better than switching port types...

Paul T.

"Jose" <jegea@innovem.net> wrote in message
news:e8PzV2rqEHA.1296@TK2MSFTNGP12.phx.gbl...
> Hello:
> I've been trying to use a serial port to fire pins connected to a
> electronic device using RTS and DTR lines but it's too slow in Windows CE.
> So I would like to test using a parallel port, but I can't find
> information about that.
> How can I fire a specific data line of parallel port in Compact Framework?
> Where I can find information about that?
>
> Thanks in advance
> Best regards
>



Re: Parallel Port to fire pins by Alex

Alex
Tue Oct 05 11:04:22 CDT 2004

I agree. Your basic parallel port is no faster than serial. It's just wider.
The OP is probably running into code latency.

--
Alex Feinman
---
Visit http://www.opennetcf.org
"Paul G. Tobey [eMVP]" <ptobey no spam AT no instrument no spam DOT com>
wrote in message news:u4pDE7uqEHA.708@tk2msftngp13.phx.gbl...
> Does your device even have a parallel port? What device are we talking
> about? If serial changes to the RTS and DTR lines are too slow, there's
> no reason to suspect that parallel would be any different.
>
> Have you tried this in unmanaged code? That has more potential to work
> better than switching port types...
>
> Paul T.
>
> "Jose" <jegea@innovem.net> wrote in message
> news:e8PzV2rqEHA.1296@TK2MSFTNGP12.phx.gbl...
>> Hello:
>> I've been trying to use a serial port to fire pins connected to a
>> electronic device using RTS and DTR lines but it's too slow in Windows
>> CE.
>> So I would like to test using a parallel port, but I can't find
>> information about that.
>> How can I fire a specific data line of parallel port in Compact
>> Framework?
>> Where I can find information about that?
>>
>> Thanks in advance
>> Best regards
>>
>
>



Re: Parallel Port to fire pins by Jose

Jose
Tue Oct 05 11:10:40 CDT 2004

Thanks for your answer, Paul:
This is not a device with a parallel port. It's a leds panel that has a
three input lines controlled by electric pulses. We would like to control
the leds panel using a micropc with windows ce, using a serial or parallel
port.
I decided to play 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
Using RTS and DTR lines I got about 50.000 pulses per second using a PC and
unmanaged code, worse in a Windows CE. I need to achieve about 100.000
pulses per second.

Any suggestion would be very apreciated

Best regards


"Paul G. Tobey [eMVP]" <ptobey no spam AT no instrument no spam DOT com>
escribió en el mensaje news:u4pDE7uqEHA.708@tk2msftngp13.phx.gbl...
> Does your device even have a parallel port? What device are we talking
> about? If serial changes to the RTS and DTR lines are too slow, there's
> no reason to suspect that parallel would be any different.
>
> Have you tried this in unmanaged code? That has more potential to work
> better than switching port types...
>
> Paul T.
>
> "Jose" <jegea@innovem.net> wrote in message
> news:e8PzV2rqEHA.1296@TK2MSFTNGP12.phx.gbl...
>> Hello:
>> I've been trying to use a serial port to fire pins connected to a
>> electronic device using RTS and DTR lines but it's too slow in Windows
>> CE.
>> So I would like to test using a parallel port, but I can't find
>> information about that.
>> How can I fire a specific data line of parallel port in Compact
>> Framework?
>> Where I can find information about that?
>>
>> Thanks in advance
>> Best regards
>>
>
>



Re: Parallel Port to fire pins by Jose

Jose
Tue Oct 05 11:24:18 CDT 2004

Hello:

Maybe the code for serial port can help. This is the method I'm using to
send the information to the panel. It spends about 62ms to send 2560 pulses.
It's to slow. How can accelerate it?

Best regards

Public Function ExecuteMatrix(ByVal matrix As Boolean()())
If mhRS.ToInt32 > 0 Then
Dim i As Integer
For i = matrix.Length - 1 To 0 Step -1
Dim j As Integer
For j = 15 To 0 Step -1
//activate clock
EscapeCommFunction(mhRS, Lines.SetRts)
If matrix(i)(j) Then
EscapeCommFunction(mhRS, Lines.SetDtr)
Else
EscapeCommFunction(mhRS, Lines.ClearDtr)
End If
//deactivate clock
EscapeCommFunction(mhRS, Lines.ClearRts)
Next
Next
EscapeCommFunction(mhRS, Lines.SetRts)
End If
End Function


"Alex Feinman [MVP]" <public_news@alexfeinman.com> escribió en el mensaje
news:ONPx7TvqEHA.2724@TK2MSFTNGP14.phx.gbl...
>I agree. Your basic parallel port is no faster than serial. It's just
>wider. The OP is probably running into code latency.
>
> --
> Alex Feinman
> ---
> Visit http://www.opennetcf.org
> "Paul G. Tobey [eMVP]" <ptobey no spam AT no instrument no spam DOT com>
> wrote in message news:u4pDE7uqEHA.708@tk2msftngp13.phx.gbl...
>> Does your device even have a parallel port? What device are we talking
>> about? If serial changes to the RTS and DTR lines are too slow, there's
>> no reason to suspect that parallel would be any different.
>>
>> Have you tried this in unmanaged code? That has more potential to work
>> better than switching port types...
>>
>> Paul T.
>>
>> "Jose" <jegea@innovem.net> wrote in message
>> news:e8PzV2rqEHA.1296@TK2MSFTNGP12.phx.gbl...
>>> Hello:
>>> I've been trying to use a serial port to fire pins connected to a
>>> electronic device using RTS and DTR lines but it's too slow in Windows
>>> CE.
>>> So I would like to test using a parallel port, but I can't find
>>> information about that.
>>> How can I fire a specific data line of parallel port in Compact
>>> Framework?
>>> Where I can find information about that?
>>>
>>> Thanks in advance
>>> Best regards
>>>
>>
>>
>
>



Re: Parallel Port to fire pins by Chris

Chris
Tue Oct 05 11:26:11 CDT 2004

See if your device has a processor GPIO available to the outside and then
write native code around that. You can get very good speed around that (I
wrote a JTAG programmer off a couple SA1110 GPIOs a while back and was
surprised at the throughput).

-Chris


"Jose" <jegea@innovem.net> wrote in message
news:esLt3UvqEHA.3416@TK2MSFTNGP15.phx.gbl...
> Thanks for your answer, Paul:
> This is not a device with a parallel port. It's a leds panel that has a
> three input lines controlled by electric pulses. We would like to control
> the leds panel using a micropc with windows ce, using a serial or parallel
> port.
> I decided to play 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
> Using RTS and DTR lines I got about 50.000 pulses per second using a PC
and
> unmanaged code, worse in a Windows CE. I need to achieve about 100.000
> pulses per second.
>
> Any suggestion would be very apreciated
>
> Best regards
>
>
> "Paul G. Tobey [eMVP]" <ptobey no spam AT no instrument no spam DOT com>
> escribió en el mensaje news:u4pDE7uqEHA.708@tk2msftngp13.phx.gbl...
> > Does your device even have a parallel port? What device are we talking
> > about? If serial changes to the RTS and DTR lines are too slow, there's
> > no reason to suspect that parallel would be any different.
> >
> > Have you tried this in unmanaged code? That has more potential to work
> > better than switching port types...
> >
> > Paul T.
> >
> > "Jose" <jegea@innovem.net> wrote in message
> > news:e8PzV2rqEHA.1296@TK2MSFTNGP12.phx.gbl...
> >> Hello:
> >> I've been trying to use a serial port to fire pins connected to a
> >> electronic device using RTS and DTR lines but it's too slow in Windows
> >> CE.
> >> So I would like to test using a parallel port, but I can't find
> >> information about that.
> >> How can I fire a specific data line of parallel port in Compact
> >> Framework?
> >> Where I can find information about that?
> >>
> >> Thanks in advance
> >> Best regards
> >>
> >
> >
>
>



Re: Parallel Port to fire pins by Dick

Dick
Tue Oct 05 12:00:50 CDT 2004

That's probably about at fast as you can get in managed code. (20-30
microseconds per loop isn't that unreasonable).

Dick

--
Richard Grier (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 4th
Edition ISBN 1-890422-28-2 (391 pages) published July 2004.



Re: Parallel Port to fire pins by Paul

Paul
Tue Oct 05 12:04:04 CDT 2004

I understand that the external device doesn't have a parallel port, but does
the *Windows CE device* have one? You still have not told us what device it
is...

Whoa! You got 1/2 of the target throughput using a PC and unmanaged code
(which is 100 times faster than your Windows CE device), and you're
expecting managed code and Windows CE to *outperform* that? You have zero
chance of getting that to work.

As Chris suggests, if you can write a Windows CE driver to talk directly to
the general-purpose I/O on your device, you may be able to do this
throughput.

Paul T.

"Jose" <jegea@innovem.net> wrote in message
news:esLt3UvqEHA.3416@TK2MSFTNGP15.phx.gbl...
> Thanks for your answer, Paul:
> This is not a device with a parallel port. It's a leds panel that has a
> three input lines controlled by electric pulses. We would like to control
> the leds panel using a micropc with windows ce, using a serial or parallel
> port.
> I decided to play 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
> Using RTS and DTR lines I got about 50.000 pulses per second using a PC
> and unmanaged code, worse in a Windows CE. I need to achieve about 100.000
> pulses per second.
>
> Any suggestion would be very apreciated
>
> Best regards
>
>
> "Paul G. Tobey [eMVP]" <ptobey no spam AT no instrument no spam DOT com>
> escribió en el mensaje news:u4pDE7uqEHA.708@tk2msftngp13.phx.gbl...
>> Does your device even have a parallel port? What device are we talking
>> about? If serial changes to the RTS and DTR lines are too slow, there's
>> no reason to suspect that parallel would be any different.
>>
>> Have you tried this in unmanaged code? That has more potential to work
>> better than switching port types...
>>
>> Paul T.
>>
>> "Jose" <jegea@innovem.net> wrote in message
>> news:e8PzV2rqEHA.1296@TK2MSFTNGP12.phx.gbl...
>>> Hello:
>>> I've been trying to use a serial port to fire pins connected to a
>>> electronic device using RTS and DTR lines but it's too slow in Windows
>>> CE.
>>> So I would like to test using a parallel port, but I can't find
>>> information about that.
>>> How can I fire a specific data line of parallel port in Compact
>>> Framework?
>>> Where I can find information about that?
>>>
>>> Thanks in advance
>>> Best regards
>>>
>>
>>
>
>



Re: Parallel Port to fire pins by Jose

Jose
Tue Oct 05 12:24:35 CDT 2004

Hello:
The device I want to use is
http://www.microcomputersystems.com/msi_1042.htm, and it has a parallel
port.
But as you say, if I'm not doing something wrong, I don't have any
possibility to achive my target in Windows CE using a serial or parallel
port.
Maybe I will look for another micropc with general-purpose I/O. Any
suggestion?

Thank you very much to everybody for your help.


"Paul G. Tobey [eMVP]" <ptobey no spam AT no instrument no spam DOT com>
escribió en el mensaje news:evTnM1vqEHA.3988@tk2msftngp13.phx.gbl...
>I understand that the external device doesn't have a parallel port, but
>does the *Windows CE device* have one? You still have not told us what
>device it is...
>
> Whoa! You got 1/2 of the target throughput using a PC and unmanaged code
> (which is 100 times faster than your Windows CE device), and you're
> expecting managed code and Windows CE to *outperform* that? You have zero
> chance of getting that to work.
>
> As Chris suggests, if you can write a Windows CE driver to talk directly
> to the general-purpose I/O on your device, you may be able to do this
> throughput.
>
> Paul T.
>
> "Jose" <jegea@innovem.net> wrote in message
> news:esLt3UvqEHA.3416@TK2MSFTNGP15.phx.gbl...
>> Thanks for your answer, Paul:
>> This is not a device with a parallel port. It's a leds panel that has a
>> three input lines controlled by electric pulses. We would like to control
>> the leds panel using a micropc with windows ce, using a serial or
>> parallel port.
>> I decided to play 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
>> Using RTS and DTR lines I got about 50.000 pulses per second using a PC
>> and unmanaged code, worse in a Windows CE. I need to achieve about
>> 100.000 pulses per second.
>>
>> Any suggestion would be very apreciated
>>
>> Best regards
>>
>>
>> "Paul G. Tobey [eMVP]" <ptobey no spam AT no instrument no spam DOT com>
>> escribió en el mensaje news:u4pDE7uqEHA.708@tk2msftngp13.phx.gbl...
>>> Does your device even have a parallel port? What device are we talking
>>> about? If serial changes to the RTS and DTR lines are too slow, there's
>>> no reason to suspect that parallel would be any different.
>>>
>>> Have you tried this in unmanaged code? That has more potential to work
>>> better than switching port types...
>>>
>>> Paul T.
>>>
>>> "Jose" <jegea@innovem.net> wrote in message
>>> news:e8PzV2rqEHA.1296@TK2MSFTNGP12.phx.gbl...
>>>> Hello:
>>>> I've been trying to use a serial port to fire pins connected to a
>>>> electronic device using RTS and DTR lines but it's too slow in Windows
>>>> CE.
>>>> So I would like to test using a parallel port, but I can't find
>>>> information about that.
>>>> How can I fire a specific data line of parallel port in Compact
>>>> Framework?
>>>> Where I can find information about that?
>>>>
>>>> Thanks in advance
>>>> Best regards
>>>>
>>>
>>>
>>
>>
>
>



Re: Parallel Port to fire pins by Paul

Paul
Tue Oct 05 12:30:48 CDT 2004

Sorry. It's a 386. It's more than 100 times slower than your PC. You will
not be able to achieve those speeds using the serial port outputs via a
standard driver from managed code under Windows CE on that device. Parallel
port or serial port is irrelevant. The time it takes to get from your
managed code running in the CLR through the device manager, into the driver
and to the point where it performs the handshake signal change is longer
than you have. You need other hardware and a well-written driver for it.
Maybe a digital I/O card on the PC/104 bus and a driver that was written to
take the total pattern that you want to write in a single WriteFile() call
would be able to do that. You could test whether that's possible or not by
bit-banging the hardware directly from DOS running on your target platform.
If that can't do it, don't expect Windows CE to succeed.

Paul T.

"Jose" <jegea@innovem.net> wrote in message
news:OWoOL%23vqEHA.2964@TK2MSFTNGP14.phx.gbl...
> Hello:
> The device I want to use is
> http://www.microcomputersystems.com/msi_1042.htm, and it has a parallel
> port.
> But as you say, if I'm not doing something wrong, I don't have any
> possibility to achive my target in Windows CE using a serial or parallel
> port.
> Maybe I will look for another micropc with general-purpose I/O. Any
> suggestion?
>
> Thank you very much to everybody for your help.
>
>
> "Paul G. Tobey [eMVP]" <ptobey no spam AT no instrument no spam DOT com>
> escribió en el mensaje news:evTnM1vqEHA.3988@tk2msftngp13.phx.gbl...
>>I understand that the external device doesn't have a parallel port, but
>>does the *Windows CE device* have one? You still have not told us what
>>device it is...
>>
>> Whoa! You got 1/2 of the target throughput using a PC and unmanaged code
>> (which is 100 times faster than your Windows CE device), and you're
>> expecting managed code and Windows CE to *outperform* that? You have
>> zero chance of getting that to work.
>>
>> As Chris suggests, if you can write a Windows CE driver to talk directly
>> to the general-purpose I/O on your device, you may be able to do this
>> throughput.
>>
>> Paul T.
>>
>> "Jose" <jegea@innovem.net> wrote in message
>> news:esLt3UvqEHA.3416@TK2MSFTNGP15.phx.gbl...
>>> Thanks for your answer, Paul:
>>> This is not a device with a parallel port. It's a leds panel that has a
>>> three input lines controlled by electric pulses. We would like to
>>> control the leds panel using a micropc with windows ce, using a serial
>>> or parallel port.
>>> I decided to play 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
>>> Using RTS and DTR lines I got about 50.000 pulses per second using a PC
>>> and unmanaged code, worse in a Windows CE. I need to achieve about
>>> 100.000 pulses per second.
>>>
>>> Any suggestion would be very apreciated
>>>
>>> Best regards
>>>
>>>
>>> "Paul G. Tobey [eMVP]" <ptobey no spam AT no instrument no spam DOT com>
>>> escribió en el mensaje news:u4pDE7uqEHA.708@tk2msftngp13.phx.gbl...
>>>> Does your device even have a parallel port? What device are we talking
>>>> about? If serial changes to the RTS and DTR lines are too slow,
>>>> there's no reason to suspect that parallel would be any different.
>>>>
>>>> Have you tried this in unmanaged code? That has more potential to work
>>>> better than switching port types...
>>>>
>>>> Paul T.
>>>>
>>>> "Jose" <jegea@innovem.net> wrote in message
>>>> news:e8PzV2rqEHA.1296@TK2MSFTNGP12.phx.gbl...
>>>>> Hello:
>>>>> I've been trying to use a serial port to fire pins connected to a
>>>>> electronic device using RTS and DTR lines but it's too slow in Windows
>>>>> CE.
>>>>> So I would like to test using a parallel port, but I can't find
>>>>> information about that.
>>>>> How can I fire a specific data line of parallel port in Compact
>>>>> Framework?
>>>>> Where I can find information about that?
>>>>>
>>>>> Thanks in advance
>>>>> Best regards
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>