Hi everybody, long time no see. I'm writing a program to use the parallel port to write to an I2C chip using a custom fixture that utilizes pins 3 and 5.
I've used inpout32.dll to access the port as described here but it doesn't seem to work properly.
Here is the method that creates that table. The messagebox is just a debugging tool because my dev machine doesn't have a parallel port and my VS version doesn't support remote debugging.
I would imagine this has something to do with how C# interfaces with the DLL but I don't know anything about that so it's a wild guess because I'm out of ideas.
I've used inpout32.dll to access the port as described here but it doesn't seem to work properly.
Code:
Here is a table of what it does: D C 0 1 0 2 1 1 8 0 0 10 0 1 This is what it should do: D C 0 0 0 2 0 1 8 1 0 10 1 1
Code:
private void update()
{
int writeVal = (dataVal ? this.DataOutputMask : 0);
writeVal = writeVal | (clockVal ? this.ClockMask : 0);
System.Windows.Forms.MessageBox.Show(writeVal + " being written to " + dataAddress);
PortInterop.Output(dataAddress, writeVal);
}
Comment