Solved

Data Communication through parallel port

Posted on 1997-12-28
5
319 Views
Last Modified: 2008-03-04
How do I program data communication thruogh parallel port
In DOS, C or assemble are OK
If has sample code is better
0
Comment
Question by:ginaa
  • 2
  • 2
5 Comments
 
LVL 10

Accepted Solution

by:
rbr earned 100 total points
ID: 1017446
Use interrupt 17h

void InitPrinter (int printer)
{
union REGS register;

register.h.ah=1;
register.x.dx=printer;
int86(0x17,&register,&register);
}

sendbyte(int printer,unsigned char byte)
{
union REGS register;

register.h.ah=0;
register.l.al=byte;
register.x.dx=printer;
int86(0x17,&register,&register);
}

int getstatus(int printer)
{
union REGS register;

register.h.ah=1;
register.x.dx=printer;
int86(0x17,&register,&register);
return ((int)register.h.ah));
}

0
 

Author Comment

by:ginaa
ID: 1017447
Sorry, I guess I don't say clear
I want to transfer data between two computers through parallel port (like LL3, LL5, DOS' Interlnk...)
I mean can a parallel port works like a serial port?

0
 
LVL 2

Expert Comment

by:PHOENIX
ID: 1017448
If both machines have windows95, use DIRECT CONNECT and a direct connect cable to the parallel ports..
0
 
LVL 10

Expert Comment

by:rbr
ID: 1017449
You can use these functions to work in both directions with these routines. I did this to controll a A/D-converter. You can use the Paper Out, the Busy and the online pin to receive data via the getstatus routine. Connect 3 pins of the 8 data pins with these 3  pins (busy, paper out, online) and vice versa and send the data with send byte.
Status-Byte:
Bit 0: Time out
Bit 4: online
Bit 5: paper out
Bit 7: Busy
0
 

Author Comment

by:ginaa
ID: 1017450
Thank you very much
But do you have any sample code for this, any code in DOS (C,
assembly will be OK)

0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

this article is a guided solution for most of the common server issues in server hardware tasks we are facing in our routine job works. the topics in the following article covered are, 1) dell hardware raidlevel (Perc) 2) adding HDD 3) how t…
Great sound, comfort and fit, excellent build quality, versatility, compatibility. These are just some of the many reasons for choosing a headset from Sennheiser.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now