Searching \ for '[OT] Windows and the Parallel Port' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/ios.htm?key=port
Search entire site for: 'Windows and the Parallel Port'.

Exact match. Not showing close matches.
PICList Thread
'[OT] Windows and the Parallel Port'
2000\02\27@170950 by Keith Burzinski

picon face
Hello (I'm back!)...  :)

I was wondering, since so many of you have used PICs to interface with a PC,
if anyone has (example) code of how to use the parallel port under Windows
(98).  I've tried the assembly thing (mov al,data  mov dx,port  out dx,al)
but it only seems to allow me to transmit 16 bytes, after which it just
stops transmitting altogether.  My device is not being over-run or anything
like that...  It just seems to stop transmitting.  Anyone got some
suggestions?  :)

TIA,
--
~Keith
spam_OUTtsk3000TakeThisOuTspamProdigy.Net
http://pages.prodigy.net/tsk3000/
ICQ UIN 15590177

2000\02\27@173749 by Wagner Lipnharski

picon face
Did you try to do it in pure bare DOS?  Not windows DOS partition...

Keith Burzinski wrote:
>
> Hello (I'm back!)...  :)
>
> I was wondering, since so many of you have used PICs to interface with a PC,
> if anyone has (example) code of how to use the parallel port under Windows
> (98).  I've tried the assembly thing (mov al,data  mov dx,port  out dx,al)
> but it only seems to allow me to transmit 16 bytes, after which it just
> stops transmitting altogether.  My device is not being over-run or anything
> like that...  It just seems to stop transmitting.  Anyone got some
> suggestions?  :)
>
> TIA,
> --
> ~Keith
> .....tsk3000KILLspamspam@spam@Prodigy.Net
> http://pages.prodigy.net/tsk3000/
> ICQ UIN 15590177

2000\02\28@014352 by Tom Handley

picon face
  Keith, Jan Axelson of Lakeview Research has a DLL (inpout32.dll) which
allows Visual Basic and other languages to directly access ports. I use it
with Windows 98 and VB5. Jan has become a `legend' with such books as
"Parallel Port Complete", "Serial Port Complete", and much more. For more
information about Jan and Lakeview Research products and to download the
DLL, goto:

     http://www.lvr.com

  - Tom

At 05:10 PM 2/27/00 -0600, Keith Burzinski wrote:
{Quote hidden}

------------------------------------------------------------------------
Tom Handley
New Age Communications
Since '75 before "New Age" and no one around here is waiting for UFOs ;-)

2000\02\28@071946 by Caisson

flavicon
face
> Van: Keith Burzinski <tsk3000spamKILLspamPRODIGY.NET>
> Aan: .....PICLISTKILLspamspam.....MITVMA.MIT.EDU
> Onderwerp: [OT] Windows and the Parallel Port
> Datum: maandag 28 februari 2000 0:10

Hello Keith,

 It sounds like a problem with the buffer in the RS-232 -chip. You could
try to wire the RTS to the CTS, and the DTR to the DSR & DCD.

I hope that helps ...

Regards,
 Rudy Wieser


> Hello (I'm back!)...  :)
>
> I was wondering, since so many of you have used PICs to interface with a
PC,
> if anyone has (example) code of how to use the parallel port under
Windows
> (98).  I've tried the assembly thing (mov al,data  mov dx,port  out
dx,al)
> but it only seems to allow me to transmit 16 bytes, after which it just
> stops transmitting altogether.  My device is not being over-run or
anything
> like that...  It just seems to stop transmitting.  Anyone got some
> suggestions?  :)

2000\02\28@072946 by Michael Rigby-Jones

flavicon
face
part 0 2943 bytes
<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">He's not using the serial port.&nbsp; The parallel port shouldn't need any handshaking lines tied.&nbsp; However, using direct port access under Windows 95/98 is a bit risky.&nbsp; Although the OS dosen't throw an exception, if another device is trying to use the port you will get unpredictable results.&nbsp; Make sure you don't have any print jobs running or scanner software active.</FONT></P>

<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">Cheers</FONT>
</P>

<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">Mike</FONT>
</P>
<UL>
<P><FONT SIZE=2 FACE="Arial">Hello Keith,</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">&nbsp; It sounds like a problem with the buffer in the RS-232 -chip. You could</FONT>
<BR><FONT SIZE=2 FACE="Arial">try to wire the RTS to the CTS, and the DTR to the DSR &amp; DCD.</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">I hope that helps ...</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Regards,</FONT>
<BR><FONT SIZE=2 FACE="Arial">&nbsp; Rudy Wieser</FONT>
</P>
<BR>

<P><FONT SIZE=2 FACE="Arial">&gt; Hello (I'm back!)...&nbsp; :)</FONT>
<BR><FONT SIZE=2 FACE="Arial">&gt;</FONT>
<BR><FONT SIZE=2 FACE="Arial">&gt; I was wondering, since so many of you have used PICs to interface with a</FONT>
<BR><FONT SIZE=2 FACE="Arial">PC,</FONT>
<BR><FONT SIZE=2 FACE="Arial">&gt; if anyone has (example) code of how to use the parallel port under</FONT>
<BR><FONT SIZE=2 FACE="Arial">Windows</FONT>
<BR><FONT SIZE=2 FACE="Arial">&gt; (98).&nbsp; I've tried the assembly thing (mov al,data&nbsp; mov dx,port&nbsp; out</FONT>
<BR><FONT SIZE=2 FACE="Arial">dx,al)</FONT>
<BR><FONT SIZE=2 FACE="Arial">&gt; but it only seems to allow me to transmit 16 bytes, after which it just</FONT>
<BR><FONT SIZE=2 FACE="Arial">&gt; stops transmitting altogether.&nbsp; My device is not being over-run or</FONT>
<BR><FONT SIZE=2 FACE="Arial">anything</FONT>
<BR><FONT SIZE=2 FACE="Arial">&gt; like that...&nbsp; It just seems to stop transmitting.&nbsp; Anyone got some</FONT>
<BR><FONT SIZE=2 FACE="Arial">&gt; suggestions?&nbsp; :)</FONT>
</P>
</UL>
</BODY>
</HTML>
</x-html>

2000\02\28@091042 by Robert A. LaBudde

flavicon
face
<x-flowed>At 05:10 PM 2/27/00 -0600, Keith wrote:
>I was wondering, since so many of you have used PICs to interface with a PC,
>if anyone has (example) code of how to use the parallel port under Windows
>(98).  I've tried the assembly thing (mov al,data  mov dx,port  out dx,al)
>but it only seems to allow me to transmit 16 bytes, after which it just
>stops transmitting altogether.  My device is not being over-run or anything
>like that...  It just seems to stop transmitting.  Anyone got some
>suggestions?  :)

The 16 bytes corresponds to the USART buffer size. This is adjustable from
windows.

You may be experiencing overrun, regardless of your comment to the contrary.

Look at the signals and control port to make sure you aren't putting the
USART in a wait state inadvertently.

================================================================
Robert A. LaBudde, PhD, PAS, Dpl. ACAFS  e-mail: EraseMEralspam_OUTspamTakeThisOuTlcfltd.com
Least Cost Formulations, Ltd.                   URL: http://lcfltd.com/
824 Timberlake Drive                            Tel: 757-467-0954
Virginia Beach, VA 23464-3239                   Fax: 757-467-2947

"Vere scire est per causae scire"
================================================================

</x-flowed>

2000\02\28@103747 by Wagner Lipnharski

picon face
What a RS232 chip has to do with the PC parallel port?

Caisson wrote:
{Quote hidden}

2000\02\28@104540 by Wagner Lipnharski

picon face
How do you hook up PIC "talking" to the PC parallel port? In full
parallel 8 bits + control? or just using few parallel port pins, like 4
or even 2 bits at a time?  I still don't see how PC's USART can
interfere with PC parallel port... it is a complete diferent chip set,
addressing and operation mode.  I think there are confusion between this
post "subject" and the real thing, and only the original poster can
clarify if the subject is wrong or not. PARALLEL PORT!  In any
situation, under Win95/98 is not "that" easy to control directly I/O
ports. Under Win95/98 you never get control over the machine, Bill Gates
has.

"Robert A. LaBudde" wrote:
{Quote hidden}

2000\02\28@114119 by Robert A. LaBudde

flavicon
face
<x-flowed>At 10:44 AM 2/28/00 -0500, Wagner wrote:
>How do you hook up PIC "talking" to the PC parallel port? In full
>parallel 8 bits + control? or just using few parallel port pins, like 4
>or even 2 bits at a time?  I still don't see how PC's USART can
>interfere with PC parallel port... it is a complete diferent chip set,
>addressing and operation mode.  I think there are confusion between this
>post "subject" and the real thing, and only the original poster can
>clarify if the subject is wrong or not. PARALLEL PORT!  In any
>situation, under Win95/98 is not "that" easy to control directly I/O
>ports. Under Win95/98 you never get control over the machine, Bill Gates
>has.

Under Win 95/98 you CAN write to the parallel port with no problems. Each
write is to the port latch, and you can easily attain rates > 100 kB/s.

The port has no memory of previous I/O, no 16 writes would mean nothing to
it. It can be overrun, but this would only result in lost characters, not a
complete stop in transmission.

The 16 characters plus stopped transmission suggested a 16550 USART, rather
than a parallel port.

PS. It's WinNT where you can't access hardware directly. This is part of
the security system. You have to supply an installable device driver to
function as an intermediary.

================================================================
Robert A. LaBudde, PhD, PAS, Dpl. ACAFS  e-mail: RemoveMEralTakeThisOuTspamlcfltd.com
Least Cost Formulations, Ltd.                   URL: http://lcfltd.com/
824 Timberlake Drive                            Tel: 757-467-0954
Virginia Beach, VA 23464-3239                   Fax: 757-467-2947

"Vere scire est per causae scire"
================================================================

</x-flowed>

2000\02\28@114940 by Michael Rigby-Jones

flavicon
face
part 0 151 bytes
<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">Mike</FONT>
</P>

</BODY>
</HTML>
</x-html>

2000\02\29@003216 by Keith Burzinski

picon face
Okay... obviously I was not coherent enough when I made the original post.
;)

I _AM_ using the PARALLEL PORT.  It is in ECP mode.  I am using the eight
(8) data lines as OUTPUTS ONLY to the PIC that I have connected.  There are
two additional lines that a parallel port uses in ECP mode to accomplish
hand-shaking (I pull my line, you pull yours, then we both reset).  THAT IS
ALL.  It is intended (and used) for one-way communication.  I am _not_
attempting to read anything from the PIC; I am only transmitting data TO the
PIC.

Next:  The device is not experiencing (sp?) over-run.  The communication
works PERFECTLY when done in DOS.  As was mentioned, over-run would result
in the loss of random characters, not a complete halt in communications.

Basiclly what I'm doing is porting a _working_ DOS program to Windows (98).

I already know that accessing the parallel port will cause unpredictable
results if I have anything else hooked up to it (printers, scanners,
etc....); let's assume for now that MY device is the ONLY device physically
connected to (and being accessed by) the parallel port.

What is my device?  A Parallel-Port to DMX-512 transmitter.  I'm working on
a PC lighting console for my smart lights.  :)

Here's exactly what happens:  When my Windows application starts, I have it
transmitting a "test pattern" to my device.  Only the first 16 bytes arrive
there, however.  After that, no matter what I do, I can't get anything more
out of the port.  It just dies.  If I want to use it again, I have to quit
my application and start it again.  Then I get 16 more bytes...

So, like, what is going on?  Why does it die after 16 bytes?  :)
Perhaps there is something I need to initialize (other than the port itself)
before I can use it (the port)?  Are there some API calls I should be
placing?  I know this has been done before... Why does it have to be so
difficult?

I'm seriously considering just writing this for X and leaving it at that.
*smirk*

Cheers,
--
~Keith
spamBeGonetsk3000spamBeGonespamProdigy.Net
http://pages.prodigy.net/tsk3000/
ICQ UIN 15590177

2000\02\29@025202 by Caisson

flavicon
face
> Van: Wagner Lipnharski <TakeThisOuTwagnerlEraseMEspamspam_OUTEARTHLINK.NET>
> Aan: RemoveMEPICLISTspamTakeThisOuTMITVMA.MIT.EDU
> Onderwerp: Re: [OT] Windows and the Parallel Port
> Datum: maandag 28 februari 2000 16:37
>
> What a RS232 chip has to do with the PC parallel port?

Hello All,

 A RS232-chip has got nothing to do with the PC's parallel port.  I
overread the part mentioning that he used the PC's parallel port :-(   I
thought I recognized the troubles due to the magical number 16.  Ah well,
have to read more carefully ...

Regards,
 Rudy Wieser

2000\02\29@112813 by jamesnewton

face picon face
I've seen programming languages and operating systems do all sorts of
interesting things "on your behalf" that you really didn't want done. So my
first guess would be that the language you are using is not really doing
what you expect it to with the port. Knowing the development environment and
seeing some of the code might allow us to help with that point.

My second guess is that Windows doesn't like things other then VDX's
monkeying with its ports in 32bit modes (it buffers DOS and 16 bit stuff)
and is inserting its own signal changes which are interfering with yours.
You might peruse one of the many books on writing device drivers. If you do,
let me know if any are worth a damn <GRIN>.

>From what I've seen, the number of people in the world who can write a
parallel port device driver for anything other than SPP mode can be counted
on your fingers and toes. Or at least that's all the people who will admit
to it. And they aren't talking. EPP and ECP windows drivers (especially
printer drivers) are apparently black art. You get this "we could tell you
but then we would have to kill you", x-files feeling when you talk to these
people. Someday, I'm going to learn how to do that and tell everybody if no
one else has... wait! what's that sound? AHHHH! ITS THE BLACK
HELECOPTERS!!!! <GRIN>

Anyway, I have a bit of information about the hardware signals
http://techref.massmind.org/io/parallel/port
but nothing really about the software side except for a very good
understanding of the PCL 5 printer language which doesn't relate to your
project. I'd be very interested in working with you on this project if you
don't mind the result being free source.

---
James Newton jamesnewtonEraseMEspam.....geocities.com 1-619-652-0593
http://techref.massmind.org NEW! FINALLY A REAL NAME!
Members can add private/public comments/pages ($0 TANSTAAFL web hosting)


{Original Message removed}

More... (looser matching)
- Last day of these posts
- In 2000 , 2001 only
- Today
- New search...