I am having problems with external power to the Fez panda 2. My program works well when the Fez Panda is powered by the usb cable but when I use an external power supply serial communications do not work in my program. To test I used a very simple program:
using System;
using System.Threading;
using System.IO.Ports;
using System.Text;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using GHIElectronics.NETMF.FEZ;
namespace FEZ_Panda_II_Application1
{
public class Program
{
public static void Main()
{
int cont = 1;
bool ledState = false;
OutputPort led = new OutputPort((Cpu.Pin)FEZ_Pin.Digital.LED, ledState);
byte[] rx_byte = new byte[1];
string cadena;
while (true)
{
SerialPort UART;
UART = new SerialPort("COM3", 115200);
cadena = "Funciona " + cont + "\r\n";
byte[] buffer = Encoding.UTF8.GetBytes(cadena);
UART.Open();
UART.Write(buffer, 0, buffer.Length);
UART.Close();
// Sleep for 500 milliseconds
Thread.Sleep(500);
// toggle LED state
ledState = !ledState;
led.Write(ledState);
cont++;
}
}
}
}
This program makes blink led of Fez Panda and print in terminal an account (use a FTDI conversor). Once loaded the program in Fez, the program works perfectly if the USB cable is connected. If the cable is disconnected and use an external power source the LED blinks but does not work the serial communication. I used different sources of supply, 5V 2A, 9V, 1A, 7.4 v lipo pack and serial communication does not work ever. However, the LED blinks, so the Fez Panda it is working.
Another thing that not works is that I can not load a program by port COM1 without connecting the USB cable. With the USB cable connected I can load any program by serial port Com1. I have long with this problem and I’m desperate. Any idea what might be wrong? Is my board defective?