Serial Interfaces

Hi Folks,

just want to test serial communication. First step between PC and device (EMX developer board, G400D) via USB and later on between my hardware and the device. Both connections should be running at the same time.

I only found this as starting point: https://www.ghielectronics.com/docs/149/device-to-pc-communication

But there is something myterious, maybe this results of the use of a ‘Gadgeteer Designer’, which I can’t use, cause I don’t can use this moduls in my solution.

Is there another starting point?

With best regards

Gerhard

Perhaps the mystery bit is this sentence:

either way, that’s the Gadgeteer linkage right there.

I would steer clear of trying to use USB directly as your communication mechanism. I’d use a TTL to Serial device ($3 on eBay, something like http://www.ebay.com.au/itm/New-1pcs-USB-2-0-to-TTL-5pin-Serial-Converter-UART-Module-CP2102-STC-5pin-cables-/400524497015?pt=AU_CablesConnectors&hash=item5d411ed077) and connect that to a COM port on your EMX DevSys/G400 and then you can use TeraTerm or some other terminal program to communicate. In code it’s as simple as opening the serial port of choice and reading and writing from it - there are a plethora of ways to approach that :slight_smile:

If you don’t have a TTL to USB serial adapter or can’t wait until one arrives, then I’d go with your EMX on one side and your G400 on the other, pick a COM port on each, connect GND together along with RX to TX crossing over, and deploy code.

If you’re going to use EMX DevSys and connect it to the PC, the DevSys has a DB9 serial connector so you’ll need an RS232 to USB adapter - which honestly are more trial-and-error than you really want to know !

Thanks for that Input.

The mystery is the code sample provided. You have an object rs232 out of nowhere …

The hardware stuff is well known, no problem.

Found an example to see, which references to set and which classes to use. It is somehow the same as on a PC, so no problem.

As I started with SDK 4.1, I lastly detect massive changes in the GHI namespace-naming in SDK 4.2 and I have to adapt all projects, so I ask, to quickly find out whats needed.

Hope the implementation uses DMA and whatever is there to reduce CPU burden.

With best regards

Gerhard

… hmmm, which time span??

With best regards

Gerhard

https://www.ghielectronics.com/docs/15/uart

Or, take a look at the GHI support page .NET Micro Framework – GHI Electronics and you can find all the links to the current library documentation, for either the netmf core or the GHI specific add-ons.

Also, I just wanted to quickly comment on the 4.1 to 4.2 namespace thing. Yep, there sure have been a few changes here, but many of them were driven by the move to 4.2 and the increasing number of products and Gadgeteer support. A lot were driven to move back into line with some of the decisions that were made in netmf, some were made because functionality expanded in netmf and was no longer needed in the GHI libs, and some was just so that there was no confusion with the way Gadgeteer expands on some of the core functionality - but your point is well taken, it’d be great to know where some of the code examples we see scattered on the site are from, are they 4.1 or 4.2… @ Jeff@ GHI might take note and add that where he knows it, and put it on new stuff as it gets added, so that we might be able to tell what gets updated should a similar thing happen when 4.3 comes along.

@ Brett - I read all the forum posts. When a 4.1v 4.2 coding issue is reported, sometimes I change it right away, sometimes I add to my list for future maintenance. We’re always trying to improve, and I’ve some new tools (thanks Josh) at my disposal to find a lot of the out-dated 4.1 references. I’m going to take your advice and tag any new or changed examples with SDK version. A simple thing that will be great for everybody.

1 Like

:slight_smile: I know that, that’s why I’m so subtle with my thoughts :slight_smile: ;D :smiley: :wink:

I really would find value in a simple comment even saying that this was a 4.2 or 4.1 or whatever current or previous version it was written for, so there’s no question whether you need to just cut-and-paste or cut-and-paste-and-transform-and-pull-my-hair-out.

mostly the latter