9.How do I program a SETUP transfer?
The USB host uses a CONTROL transfer to send a SETUP packet to the MAX3420E along with eight bytes that serve as a USB
10.Do I need to program the USB data toggles?
No. The MAX3420E handles these toggles automatically during USB transfers. The only time firmware might need to intervene is when the host sets a new configuration in a multiconfiguration design (these are rare). The MAX3420E has register bits to clear the endpoint toggles for this purpose.
11.The MAX3420E interrupt request bits are cleared by writing "1" to them. Is this backwards?
It may seem backwards at first, but it is the most efficient way to clear a register bit. To service a typical interrupt request, the SPI master reads an interrupt request register (either USBIRQ or EPIRQ), and checks using various bit masks to determine the source of the interrupt. For example, to test for the SUDAVIRQ interrupt request, firmware would read R11 (EPIRQ) and AND the result with 00100000 (the SUDAVIRQ bit is in the bit 5 position). Typically a program will equate a label like bmSUDAV with 0010000. Once the IRQ bit is detected to be a 1, the firmware can simply write the mask value back to the register (SUDAVIRQ = bmSUDAV) and only the desired bit is cleared. IRQ bits written with a zero are unchanged.
12.Do you have any programming tips?
When using the SPI
1in order to correctly set up the interface for subsequent accesses.
5.Host Software Questions
1.How does my Windows® application talk to the MAX3420E?
A Windows® application talks to the PC's USB host controller through a driver. The driver may be built into Windows or it may be custom. Windows includes
If you are designing a device that does not conform to one of the
2.Does Maxim supply a custom Windows driver? No.
3.What example code does Maxim supply?
You can find example C code for implementing a HID application on the Maxim website at USB Enumeration Code (and More) for the MAX3420E. This example code emulates a PC keyboard,
which types a text string into any Windows application that accepts text (e.g., Notepad) whenever a pushbutton is pressed. By conforming to the standard HID class, the application runs without a custom Windows driver. Regardless of your target application, most of this example code is USB 'boilerplate' that can be used as a starting point for your code.
4.I want to design a
There are two alternatives:
■Write the Windows driver yourself. This is complex and difficult, recommended for specialists only.