c# - How to send and receive 1024 Bits? -
i'm designing interface using c# windows forms , want send , receive 1024 bits using serial port, number i'm sending in hex-form, did next: private void button2_click(object sender, eventargs e) { int i; int = 0; byte[] mychar; mychar = new byte[128]; string m = textbox1.text; (i = 0; < 127; i++ ) { mychar[i] = convert.tobyte((m.substring(a,2)),16); += 2; } serialport1.write(mychar,0,127); } and check if data correct or not, shorted out both transmitter , receiver can see send textbox1 shown in textbox5, problem textbox shown output ascii, , couldn't tell how convert hex form ,(see attempt commented bellow): private void displaytext(object s, eventargs e) { textbox5.clear(); textbox5.appendtext(rxstring); //int value = convert.toint32(rxstring, 16); //string stringvalue = char.convertfromutf32(value); //textbox4.appendtext(stringvalue); } so summarize problems : 1- code send data correct...