Main Site Documentation

Can serial port interrupts be used?


#1

Hi,

I am still rather new to .net micro. I am building an application using an RS232 controlled display/touch screen.
Communicating is working ok, but I wonder what is the best way to read from my RS232 device. Is there a way to use serial port interupts, that signals whether there is data in the UART buffer to be read. Or should I just start a reader thread, that checks every xx ms for new data in the buffer and process it?

Regards,
Johan


#2

You can subscribe to incoming serial data event. Even though this is NETMF, most things are same or very similar to how they work on full .NET…a google search will get you what you need :wink:

Not only that, if you look in the many sample driver we have for components, you will probably find an example code. For example, the GPS extension driver we have already use serial receive events (link removed)

Not to forget about the many examples here (link removed)


#3

Thanks a lot. Nice URLs. With the examples I managed to get interrupt based RS232 communication running!


#4

Glad I could help :slight_smile: