Hi.
I would like to know if it’s possible to use the USB Host feature, which is inside the LPC2387 onboard of the FEZ Panda.
If the diode, protecting the 5V power supply is removed, it is possible to power a USB device - but I haven’t been able to start a communication. Does the resistors and the “pull-up” enabler on D+ has something to do with this?
Or are the pull-down resistors, which are on the Domino, required?
Or should you disable the USB-debug feature first?
This is the code I’ve tried on the FEZ Panda, which deploys fine btw.
using System;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using GHIElectronics.NETMF.FEZ;
using System;
using System.IO;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.IO;
using GHIElectronics.NETMF.IO;
using GHIElectronics.NETMF.USBHost;
namespace FEZ_Panda_Application1
{
public class Program
{
static bool ledState = false;
static OutputPort led = new OutputPort((Cpu.Pin)FEZ_Pin.Digital.LED, ledState);
public static void Main()
{
// Subscribe to RemovableMedia events
//RemovableMedia.Insert += RemovableMedia_Insert;
//RemovableMedia.Eject += RemovableMedia_Eject;
// Subscribe to USB events
USBHostController.DeviceConnectedEvent += DeviceConnectedEvent;
// Sleep forever
Thread.Sleep(Timeout.Infinite);
}
static void DeviceConnectedEvent(USBH_Device device)
{
if (device.TYPE == USBH_DeviceType.MassStorage)
{
//Debug.Print("USB Mass Storage detected...");
//....
//....
ledState = !ledState;
led.Write(ledState);
}
}
}
}
Best Regards
Thomas Jespersen