+ Post New Thread
Results 1 to 2 of 2
  1. #1
    Newbie level 1
    Points: 18, Level: 1

    Join Date
    Feb 2020
    Posts
    0
    Helped
    0 / 0
    Points
    18
    Level
    1

    max3421e as USB host

    hai i need to interface PIC24f with max3421e via spi , max3421e has to act as host. i am not clear about how to configure max3421e as host, what i did is , i configured to work in host mode and full duplex mode is this enough? if not what else i has to do? from where i get the endpoint number and function address. ihave to connect max3421e to lan7500 which act as the peripheral. the sclk is 2MHz , is this ok? please do reply as soon as possible

    •   AltAdvertisement

        
       

  2. #2
    Advanced Member level 4
    Points: 8,020, Level: 21
    Achievements:
    7 years registered

    Join Date
    Jan 2015
    Posts
    1,123
    Helped
    350 / 350
    Points
    8,020
    Level
    21

    Re: max3421e as USB host

    I think you are getting a few concepts mixed up here. (I've glanced at the various data sheets but, as I've not used these devices myself, I don't have the time to study them in depth.)
    Taking the SPI interface first, it looks like you have this fairly well sorted if you can configure the MAX3421e registers. However you mention 'full duplex' - this has an impact on the SPI interface only and lets you (for example) send a command value and simultaneously receive back the status value. Full duplex can be very useful, but you will need to check how you intend to use the combination of the MAX3421e and the LAN7500 to see what is really needed.
    Moving to the MAX3421e to LAN7500 interface, you need to read the LAN7500 data sheet to see how you need to communicate with it (it seems to be the USB low-level protocol which sits underneath the higher level protocols such as HID, CDC etc.) Once you know that the LAN7500 requires, you can then study the MAX3421e data sheet to see how to configure the registers appropriately.
    I take it that this is a homework/class exercise because it is taking a rather complex way to have the PIC24F get access tot he ethernet bus. The ENC28J60 (for example) is designed for exactly this purpose - and SPI interface directly to the Ethernet interface.
    Susan



--[[ ]]--