Serial Port Complete - Latest Microcontroller projects
Chapter 10 To reduce the number of resizing operations needed as elements are added to the list, you can specify an initial capa ...
Managing Ports and Transfers in .NET int numberOfBytesToRead; // Get the number of bytes available to read. numberOfBytesToR ...
Chapter 10 private void ProcessData() { // When eight bytes have arrived, display them and remove them from the buffer. int ...
Managing Ports and Transfers in .NET When sending data, the application should prevent or minimize timeouts and pre ...
Chapter 10 ' Define a delegate class to handle writes to the port. Friend Delegate Function WriteToComPortDelegate(ByVal text ...
Managing Ports and Transfers in .NET IAsyncResult ar; String msg; String textToWrite; // Text to write to the port. textToWr ...
Chapter 10 internal static Boolean WriteToComPort( string textToWrite ) { Boolean success; if (myComPort.IsOpen) { // Write ...
Managing Ports and Transfers in .NET internal static void WriteCompleted( IAsyncResult ar ) { String msg; WriteToComPortDele ...
Chapter 10 The safest approach is to check before each write to a port to verify that the transmit buffer has room for the data: ...
Managing Ports and Transfers in .NET # # Chapter 2 introduced flow control. The SerialPort class’s Handshake property of ...
Chapter 10 Table 10-1 shows the signals that applications can monitor and control. An application can control the RTS and DTR ou ...
Managing Ports and Transfers in .NET The code to use the PinChanged event is similar to the code for the DataRe- ceived event ea ...
Chapter 10 The routine can check to find out which pin has changed state and take action as needed. This example just displays i ...
Managing Ports and Transfers in .NET internal void PinChanged( object sender, SerialPinChangedEventArgs e ) { SerialPinChang ...
Chapter 10 # + Some errors in COM-port communications raise exceptions while others raise the SerialPort object’s Er ...
Managing Ports and Transfers in .NET // Define a delegate class to handle ErrorReceived events. internal delegate void Seria ...
Chapter 10 The ErrorReceived routine can check to find out which error has occurred and can take action as needed. This example ...
Managing Ports and Transfers in .NET private void ErrorReceived(object sender, SerialErrorReceivedEventArgs e) { SerialError ...
Chapter 10 Overrun errors indicate that UART’s buffer filled and overflowed because the driver was unable to retrieve data from ...
Managing Ports and Transfers in .NET and closing the port, sending and receiving data, and storing port parameters and other inf ...
«
7
8
9
10
11
12
13
14
15
16
»
Free download pdf