Good day to all,
Please I need your guide and support on how to use this function:
to read byte from the serial port.This function is part of the DLL that came with the chip(FT2232D) I am using on my board.I want to use the function to read a byte from the serial port and then send the value to the Graphic user interface.Unfortunately I was unable to get the expected value on my GUI.If I send for instance 40,what I get on the GUI are letters instead of the number 40 or at times the GUI will not even respond.Below are my lines of code I used to read the byte from the serial port:
ftStatus = myFtdiDevice.Read(readData, numBytesAvailable,ref numBytesRead);
The following instructions are executed whenever the CHECKBOX is checked
Below is the definition of the function from the supplied library:
void checkBox1_CheckedChanged(object sender, EventArgs e)
UInt32 numBytesRead = 0;
UInt32 numBytesAvailable = 1;
ftStatus = myFtdiDevice.Read(readData, numBytesAvailable, ref numBytesRead);
Your guide and assistance will be highly appreciated in this regard.
Read data from an open FTDI device.
// An array of bytes which will be populated with the data read from the device.
// The number of bytes requested from the device.
// The number of bytes actually read.
// FT_STATUS value from FT_Read in FTD2XX.DLL
publicFTDI.FT_STATUS Read(byte dataBuffer, uint numBytesToRead, refuint numBytesRead);