tharunsigma 0 Newbie Poster

iam new to c# and trying to work out on serial communication using timer i can send and receive the data but during printing of the received data the incoming data is overlapped on the previous data..
Please help me in advancing....and my code is as follows...`

        int nDataLen = newSerialport.ReadBufferSize;
        int nLeng = newSerialport.BytesToRead;
        if (nLeng != 0)
        {
            newSerialport.Read(chRead, 0, 20);
            for(int i=0;i<20;i++)
            stRecvData = System.Text.Encoding.UTF8.GetString(chRead);
            //textBox_Recv.Text = stRecvData;
        }               
        else
        {
            ;
        }
        textBox_Recv.Text = stRecvData;`
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.