Searching \ for 'PIC to lpt port routines' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page:
Search entire site for: 'PIC to lpt port routines'.

Truncated match.
PICList Thread
'PIC to lpt port routines'
1997\05\09@212608 by Glen Benson


Does anybody know of a routine to synchronously shift bytes out to a pc
lpt port. It sounds pretty easy but I cant seem to make it work. The PC
would request each byte. Below is some sample code in basic that I have
used with a nother chip (ADC0833).

function getbyte (lptport as integer)  using lptport 888 dec
result = 0

for i = 1 to 8
 out(lptport,1)            ' brings an input pin on pic high (say pin 2)
 result = result + inp(lptport+1)  ' read the bit value on pin 10 of the

       port , this would be the bit val of say an adc read.
                                    ' if 63 value is 0 if 127 value is 1
 result = result *2           ' shift bit values over
next i
getbyte = result

The above code is a representation of the actual code, to keep it short.

Does anybody have any ideas.

Glen Benson

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