Department of InformatiX
Microsoft .NET Micro Framework Tools & Resources
Core (2)
WPF (1)
Networking (4)
Emulators (2)
Port specifics

Serial port

Where is the DataReceived event?

There is no DataReceived event neither any possibility of interrupt on incoming data in the 2.5 version of framework, until the porting kit has explictily exposed such possibility. There are two ways hot to deal with this problem:

  1. Software - The SerialPort.Read() method blocks the thread until there are some data available on the port. So you can either create a special class, which will call Read() and fire DataReceived event with received data in parameter, or process the data in place.
  2. Hardware - Pavel Bánský suggested using for example a MAX3110E (RS-232 <=> SPI converter) with exposed interrupt pin, which you can connect to the InterruptPort, as described by Sean Liming in his Step-By-Step Guide.

How can I set the parity, start/stop bits or data length?

This is not configurable in the 2.5 version of framework, unless the porter did this for you. The settings are fixed to 8 data bits, none parity and one stop bit.

James Webster Parity/Stop bits noted... we are also looking at HW flow control (its only Software right now).