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 TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I determine db9/db25 pin status with viisual c++

Status
Not open for further replies.

CHRISBOSHOFF

Computer
Joined
Mar 4, 2003
Messages
1
Location
ZA
How do I determine db9/db25 pin status with visual c++ ?
I need to read a 1 or 0 from the db9/25 according to certain conditions.How do I do this? I need a class name from the MFC.
C1600@univtech.co.za
Please this is urgent.
Thanks.
 
#include "conio.h"
#define DATA 0x378
#define STATUS 0x379

//for writing
_outp(DATA,4); //where 4 is to be written to data port
//for input
_inp(STATUS);

/*the addresses given are the common ones for the DB25 parallel port. Data or output port is an 8 bit port white status port takes it as an 8 bit data but allows only 4 or 5 input pins. Refer-
for pinouts.

Regards

Aditya Singh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top