Fez Panda II only runs with USB cable plugged in

SDK Version 1.0.17
USBizi V

I have searched but I did not find a topic similar to this one. My appologies if one does already exist.

I have a simple program in C# which makes UART communication possible over COM 1 on FEZ Panda II board. The problem is, that the program only seems to run with the USB cable attached.
Whenever I unplug the cable, the program stops running. Even without visual studio running, so no active debugging from VS2010.

Scenarios I tried that did not work (red led was burning):

  • 7,4 volt power to Vin, without USB + reset
  • 12 volt in via adapter, without USB + reset
  • MOD jumper to GND, serial debugging works, but only when USB cable plugged in.
  • USB cable plugged in, external power supply (7.4 v battery or 12 volt adapter), removing (test serial connection, works) now removing the USB, no serial connection anymore.

I only get serial response (or servo movement for that matter) when I use the USB cable.

What am I doing wrong? Am I missing something trivial here?

Thanks for helping in advance.

With only an external power adapter (7v5 enough), can you check what is a voltage available on +5v and +3v3 pins on your board ?

Never ground MOD if you are using COM1 for you application, it will use it for debugging and it will not be available for your application.

Did you try to use COM2 instead of COM1 in your application, thus grounding MOD and debugging with COM1 (with a USB / Serial TTL adapter for an example), and see what debug information you get (using MFDeploy to read the debug information, not VS) ?

go back to a simple “blink my LED” app and try running that with the power supply in; that way you know that you have the fundamental building block working before involving UARTs

I used a 12v adapter. The current/voltage on pin +5v was 4.67 and on +3v3 it was 3.37

[quote]go back to a simple “blink my LED” app and try running that with the power supply in; that way you know that you have the fundamental building block working before involving UARTs

I just tried. Visual Studio 2010 -> File -> New Project -> Visual C# -> FEZ Panda II Application. The project created was the onboard blinking led example. And indeed that works fine. Without USB cable.
My previous project was a ‘Micro Framework -> Console Application’ and I set the startup object to static Main. As I am used to by creating Windows applications in VS2010. But a defaul ‘FEZ Panda II Application’ defines no startup object.

I guess that has something do with it. I will add my code from here on.

Thanks for helping me out!

I narrowed down the issue.
I have a 6 DOF robot arm. Logically I have chosen to use the 6 PWM ports. The MOD port is also a PWM port. But whenever I connect my servo to it it start behaving differently. Visual Studio can not find USBizi anymore (probably because the jumper setting becomes active?) Sometimes the program does not start (no blinking led, which should be running on a seperate thread as indicator).

Can I hook the servo to an analog port? I know Arduino Servo class accepts an analog port to control a servo.

I tried the following:

AnalogOut gripper = new AnalogOut(AnalogOut.Pin.Aout0);
            gripper.SetLinearScale(0, 180);

But I guess this has nothing to do with pulses?

You can use OutputCompare on any pin. Read about it and check code site.

Thank you for that. I did indeed found a software servo class for C# NETMF (http://staceyw1.wordpress.com/2011/04/19/netmf-servo-classes-pwm-and-software-versions/).
Considering that software is (ofcourse) taking resources I looked up the possibilty of adding another PWM into the circuit.
For a few bucks this could be build:

Though certainly not as easy/simple as adding a OutputCompare on a digital pin.

But not necessarily, I used all 6 PWM ports on FEZ. Thereby changing the debug interface to serial COM1. And to communicate with the board I used a bluetooth UART board om COM4 on Fez.

Thanks for all the help. Without it, I would probably still be off track.

You are welcome!

Check this thread also: