Main Site Documentation

Namespace to reference to utilize the serial tx/rx (Digital I/O Pin 0 and 1)


I’m trying to write something that will utilize the Di0 and Di1 pins as serial tx/rx. Is there a class in the GHIElectronics namespace that wraps the low level details and allows this? Or do I have to write something that explicitly manipulates those pins?


Do you mean as a UART? If so, check out the eBook (download at the top of the Wiki page) for explanation and example.
Or do you want to do something else?


Here ya go:


Sorry, I should have specified. I’m looking for UART communication. Thanks for the link, by the way. This really helps me understand. The code example in that article shows a class called SerialPort being used. The example also only shows three namespaces imported, but when I do the same, I cannot find the SerialPort class at all. What namespace does the SerialPort class belong to? The documentation says it’s in Microsoft.SPOT.Hardware, but even through the object browser, I don’t see the SerialPort class.


I just found an article on COM port changes in NetMF 4. Seems it resides in its own assembly, Microsoft.SPOT.Hardware.SerialPort.dll. But I don’t even see that assembly to add it to my project.

Here’s the article:

Like I said, I couldnt find it even with the object browser, but did find it in the NetMF assemblies folder located at: C:\Program Files\Microsoft .NET Micro Framework\v4.0\Assemblies\Microsoft.SPOT.Hardware.SerialPort.dll


You just have to add Microsoft.SPOT.Hardware.SerialPort as a reference in your projects.


Yeah, the problem was finding it. For some reason, VS wouldnt show it in the Add References dialog. Had to navigate to it manually.

Thanks, guys…


Turn off/disable Productivity Power Tools if you have it installed. It does not deal with MF refs right.


You hit the nail right on the head. I use VS2010 for my day job and Productivity Power Tools is indeed installed. Guess I’ll have to disable it each time I switch over to doing MF work.

Thanks for the tip!