I want to send string from mikroC pro to PC using C# interface. my code is:
void main()
{
while (1)
{
if (UART1_Data_Ready())
{
UART1_Write_Text("mikroC");
Delay_ms(1000);
}
}
}
but when is received in C#, it return as whole string first time, then it returns pieces of it, like it first sends 'm' then 'ikroC'. etc where as my C# code is:
private void serialPort1_DataReceived(object sender, System.IO.Ports.SerialDataReceivedEventArgs e)
{
MessageBox.Show(serialPort1.ReadExisting().ToString());
}