D
Daniel Passwater via DotNetMonster.com
I have a serial connection in C# with a device running embedded C. My problem is that if the owner of the C code puts interupts in, I receive data. Without the interupts the transfer seems to be too fast. The interupts are an un acceptable solution. We are both connecting at 19200 baud. Does anyone have any suggestions?
Here's my incoming data handler:
This is located in the constructor:
// Create event handler for the serial input.
MainOperations.port.DataReceived += new Serial.Port.CommEvent(GetPR);
private void GetPR()
{
// Since RThreshold = 1, we get an event for every character.
byte[] inputData = new byte[1];
// Read the character.
inputData = MainOperations.port.Input;
// Store in an array.
ByteInput[InputCount] = inputData[0];
// Increment input buffer index.
InputCount++;
}
Thanks in advance for the help.
Daniel
Here's my incoming data handler:
This is located in the constructor:
// Create event handler for the serial input.
MainOperations.port.DataReceived += new Serial.Port.CommEvent(GetPR);
private void GetPR()
{
// Since RThreshold = 1, we get an event for every character.
byte[] inputData = new byte[1];
// Read the character.
inputData = MainOperations.port.Input;
// Store in an array.
ByteInput[InputCount] = inputData[0];
// Increment input buffer index.
InputCount++;
}
Thanks in advance for the help.
Daniel