USB
  usb hid driver for app using 340

Post New Topic  Post A Reply
profile | register | preferences | faq | search

UBBFriend: Email This Page to Someone! next newest topic | next oldest topic
Author Topic:   usb hid driver for app using 340
dsnook
New Member
posted February 07, 2007 03:41 PM     Click Here to See the Profile for dsnook   Click Here to Email dsnook     Edit/Delete Message
I am currently using the 8051F340 to attempt implementation of a USB-to-MDIO protocol translator. I intend for this interface to permit bi-directional transfer of data from registers within an Ethernet PHY (transceiver), through USB to a host PC running a Tcl/Tk (or any other type) window for viewing. The transfers will be initiated via a command-line input within the window. The MDIO interface section is basically a 2-wire (data & clk) 'bit-banged' serial data transfer written in assembly, and has already been proven with the 330 and 353 MCUs.

I believe that I can create the firmware for this by modifying the USB interrupt code example (where appropriate) to perform this task. I believe that my specific application is characteristic of an intermittent data transfer triggered by interrupt.

After reading all the appropriate appnotes, Jan Axelson's USB Complete book and reviewing the associated USB example applications, I have concluded that an HID-class device will be sufficient for this project. Because of this assumption, the PHY registers are to be read individually and not as a block read (unless that type of transfer can also be executed using an HID-class device configuration, without much complication).

My big puzzle now is determining which driver that I use with this firmware. How do I ensure that the firmware issues the proper function calls that the driver will recognize? After reading AN169, I found that I need to install a windows driver development kit. I also found USBXpress and have installed it, but still have little or no idea how to use it. The examples made little or no sense to me.

Why do I need these tools if I intend to use a standard USB HID-class driver from MS? Do I need to develop my own host API driver for this? God, I hope not. If so, I will surely be in over my head as I am a board designer and NOT a C savvy programmer. I have previous experience writing assembly code for the 330 and 353 devices, but little or no C code experience with any of this.

As you can see I am rather confused about all this and need would appreciate if some kind souls on this forum can provide some much needed guidance for my problem. Any and all assistance is greatly appreciated. Thanks

-Darren

IP: Logged

Tsuneo
Member
posted February 08, 2007 12:49 AM     Click Here to See the Profile for Tsuneo   Click Here to Email Tsuneo     Edit/Delete Message
"Do I need to develop my own host API driver for this? God, I hope not. If so, I will surely be in over my head as I am a board designer and NOT a C savvy programmer. I have previous experience writing assembly code for the 330 and 353 devices, but little or no C code experience with any of this."

Yes, development of a host application is required, even if you are working on HID or USBXpress.
Host application and device firmware is closely related. I recommend you to find a pal PC programmer, if you take this approach.

Why don't you make it on RS232, instead of USB ?
You can use terminal emulator on PC as the front-end, such as HypterTerminal, TeraTerm, etc.
Of course, you can fiddle serial port with Tcl/Tk.
Using USB-serial chip, you can work on any PC without serial port.
And programming is just on the device firmware side.

There are many ways to accomplish the task.
Take the possible way for you, and it's the best way.

Tsuneo

[This message has been edited by Tsuneo (edited February 08, 2007).]

IP: Logged

All times are CT (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply
Hop to:

Contact Us | MCU User Forum

Have you seen our MCU Knowledge Base?


Ultimate Bulletin Board 5.47b