Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

hardware interfacing using c or c++

Status
Not open for further replies.

kotis

Newbie level 5
Joined
Oct 11, 2007
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,341
hardware interfacing through c

Hello.
I have been trying to look for a c or c++ tutorial that has instructions on hardware interfacing code.
Provide a link or any other source.
 

kevinj

Advanced Member level 4
Joined
Jan 19, 2006
Messages
118
Helped
8
Reputation
16
Reaction score
4
Trophy points
1,298
Activity points
2,233
hardware interfacing with c

what are you interfacing to?
 

kotis

Newbie level 5
Joined
Oct 11, 2007
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,341
hardware interfacing using c

I just want to interface a hand wired circut through the parallel port using visual c++
I would be glad to receive any general tutorial on interfacing using visual or borland c++.
 

jamshid.dastur

Member level 4
Joined
Sep 14, 2007
Messages
77
Helped
15
Reputation
30
Reaction score
5
Trophy points
1,288
Activity points
1,829
hardware interfacing in c

Dear Kotis, well you can interface any device using parallel port the only thing you need to have is a NPN Transistor, just conenct the base of the transistor to the Data Pin of the parallel port and then connect a relay to the emitter of and provide a vcc to the collector, the relay will be connected to your device which will be operational when the transistor is switched on, there are 8 Data Pins thus you k connect upto 8 Bits of Devices that is at most 255 Devices and control them simultaneously...the control command syntax for c/c++ is
outport(0x378,a);
here 0x378 is the parallel ports address and 'a' is a variable depending on the value data pins of the parallel port will by high/low, thus operating the specific transistor/device,...

Best Regards
Jamshid Dastur
 

snkhan

Full Member level 6
Joined
Oct 19, 2005
Messages
324
Helped
38
Reputation
74
Reaction score
20
Trophy points
1,298
Location
Gods place
Activity points
3,213
tutorial for hardware interfacing through c

Hi
Using C and C++ use the follwing two commands
InPort(adress) or inportB(addresss) to receive data from parallel port

Outport(address, data) or outportb(address, data) send data to parallel port
 

necolei

Junior Member level 2
Joined
Oct 26, 2007
Messages
24
Helped
2
Reputation
4
Reaction score
1
Trophy points
1,283
Activity points
1,409
visual c++ for hardware interfacing

use an IC to protect your parallel port. Just search for that IC because I forgot to the name of it. It will be very risky to damage your parallel port.


Regards,

Necolei
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top