MOD54415-200IR - USB host mode, Digital I/O

Discussion to talk about hardware related topics only.
Post Reply
Amalrik
Posts: 1
Joined: Fri May 15, 2015 4:03 am

MOD54415-200IR - USB host mode, Digital I/O

Post by Amalrik »

Hello! I was planning to use in one of my projects MOD54415-200IR module. I had a few questions.
1) How to configure the module to operate as USB-host? Where can I find this information? The datasheet of the module (http://www.netburner.com/mod54415/255-1-7) contains a reference to the appnote for host mode configuration, but unfortunately I could not find this document.
2) How to work with the ports of Digital I/O? In the description of the module specified that there should be 42. But, I have not found this pins in the datasheet.
Thanks in advance, and I am sorry for my english.
mbrown
Posts: 61
Joined: Tue Jan 29, 2013 7:12 pm

Re: MOD54415-200IR - USB host mode, Digital I/O

Post by mbrown »

1) That's an odd note on our datasheet. I don't remember us ever having posted an appnote for the USB configuration, but we do have a handful of notes that I'll see if we can piece together for the MOD54415/7. The work that we do have, is not entirely comprehensive however. It will show you how to test the bus, what external hardware is needed to attach to the USB pins, and how to very basically get an example working. The code I know that we do have allows the MOD5441x to act as a HID device. This has allowed us to see that the bus communicates, but host mode development and other device classes have not been done and we don't have any developers here working towards finishing it at the moment. It's a tougher protocol to develop with. If you have some way to get around using it on our devices, you'll find that the current development time without it will be shorter than trying to develop one. But if you already have a great understanding of how USB works, the appnote I'll put together will help you get off the ground. It may not be the most helpful to you immediately, but there have been enough questions about it recently that I think we should put it out.

2) There are a handful of ways to deal with the Digital I/O ports. The pins are listed as the General Purpose I/O columns in the data sheet. As you'll see, most of the pins on J2 can be used as GPIO, and a handful on J1.

The easiest way code-wise to deal with them is by including pins.h in your application and making calls like the following.

J2[44].function(PINJ2_44_GPIO);
J2[44] = 1;
J2[44] = 0;
read_value = J2[44];

Our pins class allows you to treat I/O pins like objects so you can set them equal to 1 or 0 to drive them or you can read from them by simply querying for it's value. I'm sure we have an app note dealing with that, but it's usually simple enough to explain. You can actually change the pin function to any of it's alternate functions the same way using the .function call. Take a look at the nburn/MOD5441X/include/pins.h file for more I/O example calls and the nburn/MOD5441X/include/pinconstant.h file for the macros to set pin functions.

If you want to write to a whole bank of a GPIO at once, take a look at how the pins class driver works in nburn/MOD5441x/system/pins.cpp and adapt one of your own for your needs. If you want to work with the RapidGPIO, which is faster, take a look at the example in nburn/examples/MOD5441X/MOD5441x-RapidGPIO. Certain pins allow for you to communicate with the RGPIO bus faster than you would the regular GPIO and people have done some cool stuff with it, but for most purposes, you'll probably find the GPIO bus works fine.

Your English is also great. Welcome to our community by the way.
pkoe
Posts: 1
Joined: Mon Jul 25, 2016 11:37 pm

Re: MOD54415-200IR - USB host mode, Digital I/O

Post by pkoe »

You mentioned, that you have some code for the HID device side. That's exactly what I need. I want to send simple commands from the PC, without using device specific USB drivers, just relying on the HID packets.
Thanks, Peter
Post Reply