• AVR Freaks

How to run TCP/IP demo app using waveshare LAN8720 Eth Board

Author
abhinav27
Senior Member
  • Total Posts : 173
  • Reward points : 0
  • Joined: 2015/08/26 23:52:10
  • Location: 0
  • Status: offline
2015/11/16 02:14:00 (permalink)
0

How to run TCP/IP demo app using waveshare LAN8720 Eth Board

 I have successfully run the TCP/IP demo app provided by MLA on PIC32 Ethernet Starter kit and was able to open my own webpage.
Now I have waveshare LAN8720 Eth Board connected to PIC32. I tried using the same app but was not able to open the webpage. I want to know that what changes do I have to make in order to run TCP/IP demo app using LAN8720.
If this is not possible, then what other methods do I have to use Ethernet functionality using LAN8720 
post edited by abhinav27 - 2015/11/16 04:24:14
#1

10 Replies Related Threads

    maxruben
    Super Member
    • Total Posts : 3340
    • Reward points : 0
    • Joined: 2011/02/22 03:35:11
    • Location: Sweden
    • Status: offline
    Re: How to run TCP/IP demo app using waveshare LAN8720 Eth Board 2015/11/16 07:22:41 (permalink)
    3 (1)
    It certainly is possible. I have my own board up and running with a LAN8270. If I remember correctly (it was a while ago) you just need to use ETHPIC32ExtPhySMSC8720.c instead of ETHPIC32ExtPhyDP83848.c.
     
    Check this link: http://www.microchip.com/forums/FindPost/522483
     
    /Ruben
    #2
    abhinav27
    Senior Member
    • Total Posts : 173
    • Reward points : 0
    • Joined: 2015/08/26 23:52:10
    • Location: 0
    • Status: offline
    Re: How to run TCP/IP demo app using waveshare LAN8720 Eth Board 2015/11/16 09:11:37 (permalink)
    0
    I have done all the things which is mentioned in the link you provided. 
    I am using MAL V2013-06-15 with stack version of v5.42.08
    I have used the ETHPIC32ExtPhySMSC8720.c instead of ETHPIC32ExtPhyDP83848.c but when I upload the code and insert the LAN cable between my hardware to my pc, nothing seems to happen.
    My network status remains disconnected and the TCP/IP discoverer app doesnt find my device and didnt give me the IP Address.
    What steps did you followed after uploading the code.?
    How did you get the IP address.?
    Does your PC automatically gets the IP or you manually enter the IP?
    Do I need to use any another MAL Version?
    post edited by abhinav27 - 2015/11/16 09:14:34
    #3
    maxruben
    Super Member
    • Total Posts : 3340
    • Reward points : 0
    • Joined: 2011/02/22 03:35:11
    • Location: Sweden
    • Status: offline
    Re: How to run TCP/IP demo app using waveshare LAN8720 Eth Board 2015/11/17 04:54:15 (permalink)
    0
    abhinav27
    What steps did you followed after uploading the code.?
     

     
    I didn't do anything special, just uploaded and it worked. But I have only been using the LAN8720 from the beginning of this project.
     
    abhinav27
    How did you get the IP address.?

     
    DHCP. My PIC and the PC is connected to the same router and both gets the IP address from it.
     
    abhinav27
    Does your PC automatically gets the IP or you manually enter the IP?

     
    My PC gets the IP via DHCP from my router.
     
    abhinav27
    Do I need to use any another MAL Version?

     
    I am using the same as you.
     
    Have you tried to use a crossover cable or connect both your PC and the PIC to a router?
     
    /Ruben
     
    #4
    abhinav27
    Senior Member
    • Total Posts : 173
    • Reward points : 0
    • Joined: 2015/08/26 23:52:10
    • Location: 0
    • Status: offline
    Re: How to run TCP/IP demo app using waveshare LAN8720 Eth Board 2015/11/17 05:36:00 (permalink)
    0
    I am using straight cable which used to work fine with starter kit. Did you used crossover cable?
    I'll try with crossover and will tell you then.
    #5
    maxruben
    Super Member
    • Total Posts : 3340
    • Reward points : 0
    • Joined: 2011/02/22 03:35:11
    • Location: Sweden
    • Status: offline
    Re: How to run TCP/IP demo app using waveshare LAN8720 Eth Board 2015/11/17 08:00:29 (permalink)
    3 (1)
    abhinav27
    I am using straight cable which used to work fine with starter kit. Did you used crossover cable?
    I'll try with crossover and will tell you then.


    I have always used a straight cable but both PC and PIC was connected to the same router.
    The LAN8720 do have Auto-MDIX but I am not sure if it is enabled or disabled by default.
     
    Do you have led functions on the RJ45 jack that makes sense? I.e. does led status change when you plug/unplug the cable and when you transmit something?
     
    What does the debugger tell you? Do you have communication with the LAN8720 RMII interface as you should?
     
    How have you connected the waveshare board to the PIC? Are you sure it is wired correctly?
     
    /Ruben
    #6
    abhinav27
    Senior Member
    • Total Posts : 173
    • Reward points : 0
    • Joined: 2015/08/26 23:52:10
    • Location: 0
    • Status: offline
    Re: How to run TCP/IP demo app using waveshare LAN8720 Eth Board 2015/11/17 09:21:57 (permalink)
    0
    Yes led status changes. The yellow and green led starts blinking. I know this is the symbol of activity. But not working.
     
    I have not tried debugging the code. Will try and let you know.
     
    I have a module of LAN8720 ETH BOARD. Its pins are soldered with PIC32MX795F2L in RMII mode. I have not done the designing part but yes I can say that they are connected properly. 
    #7
    flatbush
    Senior Member
    • Total Posts : 124
    • Reward points : 0
    • Joined: 2009/01/30 07:51:14
    • Location: 0
    • Status: offline
    Re: How to run TCP/IP demo app using waveshare LAN8720 Eth Board 2015/11/19 06:44:45 (permalink)
    0
    I remember DP83848 and LAN8720 didn't have the same address with Harmony by default. You could check that.
    #8
    abhinav27
    Senior Member
    • Total Posts : 173
    • Reward points : 0
    • Joined: 2015/08/26 23:52:10
    • Location: 0
    • Status: offline
    Re: How to run TCP/IP demo app using waveshare LAN8720 Eth Board 2015/12/11 03:07:18 (permalink)
    0
    I have a 11MHZ of crystal. Do I need to change the fuse settings. I changed the setting but it didnt worked. How are you adding the files of LAN8720 in the project. I am adding the files by right clicking and selecting add existing item.
    #9
    roundrocktom
    Super Member
    • Total Posts : 1023
    • Reward points : 0
    • Joined: 2012/09/07 08:19:09
    • Location: Texas
    • Status: offline
    Re: How to run TCP/IP demo app using waveshare LAN8720 Eth Board 2015/12/12 09:23:46 (permalink)
    0
    What is the 11MHz crystal connected to?
     
    For the LAN8720 in MII Mode, you need a 25MHz XTAL
    For the LAN8720 in RMII mode, you need a 50MHz Clock.
     
    What mode are you running?  What is the clock frequency?  
     
    Check your schematic by looking at the PIC32 Ethernet Starter Kit II  and LAN8720 daughter card to see how they did the clocking (LAN8740 is running RMII mode, 50Mhz Clock drives both the MAC and PHY).  
     
    Personally I prefer MII mode running 25Mhz do help with EMI issues, ESK-II connector doesn't have many pins so Microchip opted to run in RMII mode just due to header pin count.
     

    Attached Image(s)

    #10
    abhinav27
    Senior Member
    • Total Posts : 173
    • Reward points : 0
    • Joined: 2015/08/26 23:52:10
    • Location: 0
    • Status: offline
    Re: How to run TCP/IP demo app using waveshare LAN8720 Eth Board 2015/12/15 22:21:16 (permalink)
    0
    @roundrocktom
    Hi
    11MHZ crsystal is connected to to PIC32. So do I need to change something in fuse settings in tcp/ip demo app?
    I have a complete module connected to PIC32MX795F512L so didnt know what crystal is connected on board. I have changed the address but still its not working. How can I debug it?
    #11
    Jump to:
    © 2019 APG vNext Commercial Version 4.5