View previous topic :: View next topic |
Author |
Message |
TooOld4this
Joined: 02 Jan 2024 Posts: 3
|
WizNet TCP/IP Ethernet |
Posted: Tue Jan 02, 2024 5:34 am |
|
|
Can anyone share their TESTED CCS code for the W5100 / W5500 chips from WizNet? Or a stack I can purchase? Need to implement TCP/IP listener.
Thanks. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19495
|
|
Posted: Fri Jan 05, 2024 11:40 am |
|
|
First thing you need to say at least what PIC family you are thinking of
using?.
Also, critical thing I'd suggest considering the WS5200 rather than the 5100
family, Th 5100 has a lot of bugs.
Remember this is a 3.3v evice. Using a PIC24, with a few small changes
the Wiznet supplied code will compile directly. |
|
|
newguy
Joined: 24 Jun 2004 Posts: 1907
|
|
Posted: Fri Jan 05, 2024 12:31 pm |
|
|
Putting aside the possibility that the OP is looking for a 'one off' product...
Apparently the 5200 is not recommended for new designs; the 5500 is. Any experience with the 5500? |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19495
|
|
Posted: Sat Jan 06, 2024 6:59 am |
|
|
Yes, it was his referring to 5100 that worried me. The 5100, was updated
to the 5100S, and though this fixed a lot of things it was always a buggy
chip.
The 5500 doubles the number of supported sockets, and this can be very
useful. Programming is almost the same, except for this. The 5500 performs
much better throughout. There is a tiny difference in the behaviour when
all sockets are busy, and this can cause problems since the 5500 behaviour
leads to an abort when this happens.
With one change (how pointers to subroutines are handled), the Arduino
port of the Wiznet drivers will compile on a PIC24, with the hardware layer
re-coded to use the PIC SPI. This change was discussed here. |
|
|
TooOld4this
Joined: 02 Jan 2024 Posts: 3
|
|
Posted: Sun Jan 07, 2024 2:09 am |
|
|
Thank you for your help.
I was planning on using dsPIC33EV series, 5V (due to other parts which communicate at 5V).
The application does not require too many sockets - basic TCP/IP comm. to a host.
Thanks for the advice to use the 5500 - point taken.
If there is a better option than WizNet let me know. 1000Base-T would be even better. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19495
|
|
Posted: Sun Jan 07, 2024 4:16 am |
|
|
Using 5v will be a problem.
Look again at your other parts. How many of these can be 3.3v instead?.
If you must go to using 3.3/5, have your own proper level translators.
There is a huge problem with using units built for the Arduino supposedly
supporting 5v operation. Many of these rely on the Arduino inputs
supporting 2.4v as a logic high. The PIC does not. On SPI, the Vih for
a 5v PIC is typically 4v. You therefore must have proper translators.
Faster sounds great, but the PIC is not going to be able to handle this.
The ley thing to understand is that the WS5500 has the TCP/IP stack
handled by the chip, saves a huge amount of code space compared
to almost any other controller. This is why they are so popular. |
|
|
TooOld4this
Joined: 02 Jan 2024 Posts: 3
|
|
Posted: Sun Jan 07, 2024 7:42 am |
|
|
Thank you. I will consider moving to 3.3V. |
|
|
MCUprogrammer
Joined: 08 Sep 2020 Posts: 221
|
|
Posted: Wed Apr 24, 2024 9:09 am |
|
|
1. **Connections**: Connect the SPI pins of your PIC microcontroller (usually SCK, MOSI, MISO, and SS) to the SPI pins of the W5500 module. Also, connect the power and ground pins of the W5500 module to your PIC in a compatible manner.
2. **Software Library**: You'll need to use an appropriate software library to control the W5500. This library will handle SPI communication and Ethernet communication with the W5500. Depending on your PIC model and the programming language and development environment you're using, choose a suitable library.
3. **Software Development**: Develop appropriate software on the PIC based on the chosen library. This software will handle the configuration of the W5500 via SPI, establish network connections, and facilitate data communication.
4. **Network Settings**: Configure network settings using the W5500. Parameters such as IP address, subnet mask, default gateway, etc., are typically determined by the software.
5. **Testing**: Develop a test application to ensure that you've made the connections correctly and loaded the software properly. This application should include functionalities such as connecting to the network via W5500, exchanging data, and communicating over the network when necessary.
Following these steps, you can use the W5500 Ethernet module with your 5-volt PIC microcontroller. By carefully following each step and ensuring compatibility between hardware and software, you can achieve seamless operation. _________________ Best Regards...
MCUprogrammer
_______________________________
Work Hard |
|
|
|