Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

question on parallel port

Status
Not open for further replies.

Leibnitz

Programmer
Apr 6, 2001
393
CA
Hi,
i would like to ask about reading data from control port?

control port one of the registers of parallel port.

if i made a program to read data from this register what is the maximum value i got from this port?

this code shows how to read control port( 890 = address of it)
code : start
Dim invalue As Byte
invalue = PortIn(890)
code : finish

i want to know what should be the possible values of invalue variable???

 
Any variable declared as Byte can only take integer values from 0 to 255

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'
 
Thanks for that, i didn't recognize my decalration to byte, since i was thinking that the control register has 5 bits and each one could take 2 values either 0 or 1 so i thought the range of values would be between 0 and 32 (00000-11111).

so could you tell me how i could make the control register itself determine the value. i mean what type definition i should use instead of byte.



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top