Originally Posted by
Salem
Your other problem to overcome is if you're using a protected OS which doesn't allow any Tom Dick or Harry free reign over the I/O address space.
In most modern desktop operating systems, all access to the hardware is via a driver under control of the OS. Mere user level programs don't see the hardware directly.
I know, but I am using the Output32.dll which solves this. It the simple problem of understanding what to send to the port to open/close the pin which is my problem.
Right now I can send signals, but I dont understand fully what to do in order to open port X. Right now it looks kinda random to me.
EDIT:
I made a small program which goes something like this:
Code:
int key = 0;
while (key != -1)
{
std::cout << " \n Enter a number between 0 and 7 to open/close a port" << std::endl;
std::cin >> key;
if (key == 0)
{
Out32(888,0);
}
if (key == 1)
{
Out32(888,1);
}
if (key == 2)
{
Out32(888,2);
}
.................
But the number does not open the correct pin. Also, when converting to binary it makes no sens to the output I get on the LEDs