| 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: 20095
|
|
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: 1941
|
|
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: 20095
|
|
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: 20095
|
|
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: 233
|
|
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 |
|
 |
allenhuffman
Joined: 17 Jun 2019 Posts: 676 Location: Des Moines, Iowa, USA
|
|
Posted: Thu Jun 25, 2026 2:00 pm |
|
|
In case anyone else ends up here...
A few years ago we put a Wiznet on one of our PIC24 boards for a simple TCP/IP ethernet server. It has worked well.
We also experimented with their HTTP server for a proof-of-concept, but ended up using our own protocol.
Recently, I began working on a new project that tried to make use of Wiznet's I/O library code for http, snmp and other protocols. I had to use MPLAB's toolset to get them built without making a lot of changes to the base code, but now I wish I had stuck with CCS. So many hoops we have had to jump through.
Then we stumble in to all kinds of issues with their provided code, and see many pull request/bug fixes that they just close and ignore.
At this point, I do not expect to recommend using the Wiznet code for any future projects we may have that use ethernet.
YMMV. _________________ Allen C. Huffman, Sub-Etha Software (est. 1990) http://www.subethasoftware.com
Embedded C, Arduino, MSP430, ESP8266/32, and PIC24 programmer.
http://www.whywouldyouwanttodothat.com ?
Using: 24FJ256GA106, 24EP256GP202, 24FJ64GA002 and 24FJ1024GA606. |
|
 |
Gabriel
Joined: 03 Aug 2009 Posts: 1079 Location: Panama
|
|
Posted: Sat Jun 27, 2026 9:28 am |
|
|
Ive recently(like during 2026) developed an app with the W5500 - never used before, didnt even understand how it worked, and the datasheet i felt was lacking.
I was overwhelmed and decided to get help with AI, using githubs copilot.
i needed to get an MVP working FAST - after months of trying - last resort.
I did. It worked. using CCS (took a lot of convicing for the AI to "get" ccs)
I took some time later to understand what the AI did...i did, no longer feeling overwhelmed. even cleaned some stuff. (cant support code i dont understand)
its simple code, and the chip is simple to operate.
I got DHCP, mDNS, and 2 simultaneous sockets working nicely.
the hardest part is really is just getting the SPI routines to work and figuring out the order of operations needed to say: open a socket and send data. (AI figured that one out).
I learned a lesson, use tools available. also, trust, but verify. _________________ CCS PCM 5.078 & CCS PCH 5.093 |
|
 |
|