'PIC to lpt port routines'
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
getbyte = result
The above code is a representation of the actual code, to keep it short.
Does anybody have any ideas.
More... (looser matching)
- Last day of these posts
- In 1997
, 1998 only
- New search...