electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

parallel port interfacing with Turbo C++


Post new topic  Reply to topic    EDAboard.com Forum Index -> PC Programming and Interfacing -> parallel port interfacing with Turbo C++
Author Message
vkixer



Joined: 26 Jun 2008
Posts: 2
Location: india


Post26 Jun 2008 12:05   

parallel port c++ xp


Hi
I want to use the parallel port of my computer to make external electronics work. I am using Turbo C++ in Windows XP. I heard that you have to include inpout32 to make the programme work. Is just placing inpout32.dll in the sytems directory sufficient? If not, how do I call inpout32 from Turbo C++?
Back to top
TekUT



Joined: 17 Jun 2008
Posts: 413
Helped: 23


Post26 Jun 2008 22:30   

parallel port interfacing c


inpout32.dll is a dll, to use the methods exposed from this dll you've to load it and then call the desired functions.
Take also a look at this link:

http://www.codeproject.com/KB/vb/Inpout32_read.aspx

Cheers
F.F. a.k.a. Powermos
Back to top
Google
AdSense
Google Adsense




Post26 Jun 2008 22:30   

Ads




Back to top
the_risk_master



Joined: 12 Aug 2005
Posts: 688
Helped: 59
Location: UE+MIT, Philippines, (14°N , 120°E )


Post27 Jun 2008 1:56   

parallel port turbo c


Yes vkixer, placing inpout32.dll in the systems directory should be fine (if you did)

You said that your machine runs on winXP, you can also download and install portTalk or UserPort in the software downloads section in this board so can have access to your parallel and serial ports
Back to top
vkixer



Joined: 26 Jun 2008
Posts: 2
Location: india


Post27 Jun 2008 6:07   

turbo c++ parallel port


thanks
but the link shows programming in VB.
I have added the inpout32.dll to my systems directory
I want to know how to call the requred funtions of inpout32 in turbo C++.
Back to top
TekUT



Joined: 17 Jun 2008
Posts: 413
Helped: 23


Post27 Jun 2008 10:02   

parallel port programming in c


Take a look also to this site.

http://www.hytherion.com/beattidp/comput/pport.htm

Cheers
Pow
Back to top
mezo



Joined: 16 Jul 2007
Posts: 82
Helped: 4
Location: Egypt


Post18 Aug 2008 15:09   

parallel port programming in turbo c++


No you don't need any file . i did without the file inpout32.dll.

you just use the functions :inp, outp . knowing the port number .

Here is the code :

#include<stdio.h>
#include<conio.h>

int main(void) {
unsigned port = 0x378 // first pin in parallel port 0x378-0x37f
int value ;
value = outp(port,'c') // c is the number you'll send to LPT
printf("value %c sent to port %d\n", value, port);
return 0 }


send me if you need anything .
Back to top
TekUT



Joined: 17 Jun 2008
Posts: 413
Helped: 23


Post19 Aug 2008 12:40   

parallel port programming in c++


mezo wrote:

No you don't need any file . i did without the file inpout32.dll.

you just use the functions :inp, outp . knowing the port number .

Here is the code :

#include<stdio.h>
#include<conio.h>

int main(void) {
unsigned port = 0x378 // first pin in parallel port 0x378-0x37f
int value ;
value = outp(port,'c') // c is the number you'll send to LPT
printf("value %c sent to port %d\n", value, port);
return 0 }


send me if you need anything .


Have tested this code also in WinXP OS?

Thanks
Pow
Back to top
mezo



Joined: 16 Jul 2007
Posts: 82
Helped: 4
Location: Egypt


Post20 Aug 2008 22:44   

parallel port turbo c win xp



Yes , i have tested this code in WinXP Enviroment and it works .
why don't you check it out to be sure ?
Back to top
TekUT



Joined: 17 Jun 2008
Posts: 413
Helped: 23


Post21 Aug 2008 10:50   

parallel port in turbo c


@mezo

Thank for reply, I can't test it now simply bcz I've to install the TC++ environment, I've used TC++ some year ago (at my college with DOS based release, I can remember usage of some library extension to code program with windows), now I'm using VC++, but what I need to know is just to be sure about pratical use of the in and out in WinXP environment.

Thank again.

Bye
Pow
Back to top
genious_us



Joined: 13 Oct 2009
Posts: 1
Location: pakistan


Post13 Oct 2009 16:13   

Re: parallel port interfacing with Turbo C++


Can u send me code in visual C++ for parallal port interfacing in Win Xp.....
Back to top
trushar_mechatronics



Joined: 07 Jun 2008
Posts: 2


Post21 Oct 2009 18:43   

Re: parallel port interfacing with Turbo C++


Dear Mezo,

I have tested your code. It works. But there are some problems. I want your help to solve these problems.

For any value, I am turining on Seven segment LED. I am getting correct results bt it is displayed after completion of program and mostly I need to run the program twice.

Other problem I am facing is I have made soft counnter using your hint bt it is not working.

Can you send me the solution?? I will be very thankful to you.

I also request you to send your personal email id so that I can send you d code for second problem.

I have uploaded image of first program.

Thank you.
Trushar Shah



Sorry, but you need login in to view this attachment

Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> PC Programming and Interfacing -> parallel port interfacing with Turbo C++
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
Help 4x4 Keypad interfacing using Parallel Port in Turbo C++ (2)
interfacing with parallel port? (6)
interfacing pic16f877A with pc parallel port (1)
examples or application of VB with parallel port interfacing (1)
help about interfacing in quickbasic with the parallel port (2)
Accessing parallel port using Turbo C compiler on Windows XP (3)
parallel port interfacing (2)
Parallel port interfacing (2)
parallel port interfacing (3)
books for parallel port interfacing in C (5)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS