FEZ to PC connectivity

I received my FEZ Domino yesterday and I must say that it appears to be a very nice board and, as you say, programming within VS2008 is much easier than more proprietary compilers for devices such as the Microschip PIC. For people who need to work with microcontrollers then I feel that this will be a very nice product †the documentation makes getting started very easy.



Now, I purchased the board for a simple data acquisition project that is pretty generic in it’s requirements and basically I need to read some ADC values to an array and then, periodically, read them to a PC for display and processing. What I really want to be able to do is access the FEZ board as a virtual COM device and so was wondering if there is any example code available for using the CDC USB client to do this? A very simple example showing the “best practices” for such communication would be very useful indeed. Should buffer be polled or can you have an event raised when data arrives in the buffer? A simple example that just echos back characters typed into a terminal program would be great.



You also mention in the documentation that you’ll lose the ability to debug unless you reconfigure the board to use a COM port. How exactly should you do this, I see there is a “Model” jumper on the board but this doesn’t seem to be documented is this anything to do with the debugging. Do you use the COM2 port that has a connector on the board for debugging a USB client device and in this case do you need something like a MAX232 converter and then an RS232/USB connector to attach to the PC?



Any guidance you can provide would be greatly appreciated. Thanks in advance and good luck with FEZ over the coming months.

We are glad you like FEZ…freaking easy!



About the CDC (USB virtual serial port), you can actually implement that now if you know USB but I would say this is very advanced and require a lot of knowledge. We provide libraries to do this for you but unfortunately the libraries are not in this release just yet. I do not recommend you trying to implement it on your own.

The release notes lists “USB Client (slave) extensions” in the planned features. It is going to be about a month before this feature is available.



About debugging using COM instead of USB, this is documented in USBizi user manual but we will make this easier to understand on this website. There will be a tutorial and maybe a video showing how to do this once we have added the “USB Client (slave) extensions” which includes CDC, mouse emulation, keyboard emulation and mass storage.



Basically, you just need to wait for few weeks and everything will be explained on this website.

OK, thanks for the information and I’ll periodically check back for updates. In the meantime, I’ll probably try to use the COM2 lines on UEXT and slap on a TTL to USB converter module such as http://www.ftdichip.com/Products/EvaluationKits/UB232R.htm


It actually uses COM1 not COM2. All you need is to short the MODE jumper and plug something like this

http://www.cutedigi.com/product_info.php?products_id=4329



Now, you can do everything over serial instead of USB…freakin’ easy!

Thanks, the silkscreen on the back of the board says COM2 and so that’s what I based my comments on. What exactly does the “MODE” jumper do and where is it described?



As for using http://www.cutedigi.com/product_info.php?products_id=4329 this isn’t so attractive since my computer, and most others don’t have a RS232 socket and so then I’d need a RS232 USB converter. The item that I’m thinking about does this in one TTL USB by acting as a Virtual COM port. Unless I am mistaken that is…

The silkscreen on the back is for the UEXT header. That is correct, it is COM2.

COM1 is on the top silkscreen. They are pins Di0 and Di1