Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics 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.

How to use C++ to read/write data to an ISA/PCI card?

Status
Not open for further replies.

Sputnik

Full Member level 3
Joined
Oct 19, 2004
Messages
150
Helped
4
Reputation
8
Reaction score
1
Trophy points
1,298
Location
South Africa
Activity points
1,667
c++ write to pci

I've been wanting to do a project making use of a homemade PC expansion board installed into a computer so that I may interface the computer with the real world. I would like to use C++, pretty much because it is the only programming software I have. Either ISA or PCI as this will be used in a 486/Pentium 1.

Thanking you in advance
Sputnik
 

Re: How to use C++ to write data to an ISA/PCI slot?

on which operating system?
 

Re: How to use C++ to write data to an ISA/PCI slot?

I will be using either Win95 or 98 but more likely 98.

Sputnik
 

Re: How to use C++ to write data to an ISA/PCI slot?

You have 2 options.
1-Write a windows device driver;
2-Use inpout32 and access your hardware directly...

If you don't want to write a device driver go to:
**broken link removed**

and download inpout32 this may help you a lot.
It should run in all windows flavours.
S.
 

Re: How to use C++ to write data to an ISA/PCI slot?

Try the following functions only if you're using Win95/98
(they won't run on WinNT/2000/XP)
Regards

---------------------------------------------------------------
void WritePort(USHORT PortAddress, UCHAR PortData)
{
asm
{
mov dx,PortAddress
mov al,PortData
out dx,al
}
}
------------------------------------------------------
UCHAR ReadPort(USHORT PortAddress)
{
UCHAR PortData;
asm
{
mov dx,PortAddress
in al,dx
mov PortData,al
}
return PortData;
}
-------------------------------------------------------
 

    Sputnik

    Points: 2
    Helpful Answer Positive Rating
Re: How to use C++ to write data to an ISA/PCI slot?

As was indicated to deal with big OS you need a driver .The user application request to the OS be granted the access then the OS looks for the driver to use . here is another possibility
https://www.jungo.com/ you can downloaded but it works for some time only ..then you have to buy it ..
 

if you want to do this stuff in win2K/XP, you can download my old "quick-hack" driver source code which can be downloaded at http://www.geocities.com/mamanzip/. The software named ExploChip, it's open source. Just look at portprobe.c (the driver source code) and in the user application code, the driver is accessed by the user application by using a call to DeviceIoControl API, that's available in windows. Goodluck :wink:
 

Please look at my previous post.
You don't have to worry. inpout32 works in all flavours of windows, w95/98, nt, 2k, xp, etc....
Have a look at:
h**p://www.logix4u.net/inpout32.htm
You don't have to pay anything, and the source code is available!
S.
 

Hello dear
u can also use tvichw32 which have the following link

www.entechtaiwan.com/dev/index.shtm

this is the o.s indepndent this is shareware and very easy to use .

u can also write interrupt routines easily in any language.

it contains bundle of examples in very common languages.
 

Hi.
I use a PCL data aquisition card for ISA. I simply read and write from/to it using outportb in C++.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top