Can anyone help me?, I have a problem.
When I deployed the program that have “UART_DataReceived” event. First time, It can receive the character from UART correctly. But after I pressed the reset button, UART did not work.
How should I do?, Help me Pleas…
I connected a wire from TX to RX on FEZ Domino board.
*Here is the code
static SerialPort UART ;
static byte[] tx = System.Text.Encoding.UTF8.GetBytes("Test");
static void UART_DataReceived(object sender, System.IO.Ports.SerialDataReceivedEventArgs e)
{
Debug.Print("Data Received");
}
public static void Main()
{
UART = new SerialPort("COM1", 9600);
UART.DataReceived += new SerialDataReceivedEventHandler(UART_DataReceived);
UART.Open();
while (true)
{
UART.Write(tx, 0, tx.Length);
Thread.Sleep(100);
}
}