CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

WizNet TCP/IP Ethernet

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
TooOld4this



Joined: 02 Jan 2024
Posts: 3

View user's profile Send private message

WizNet TCP/IP Ethernet
PostPosted: Tue Jan 02, 2024 5:34 am     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Jan 05, 2024 11:40 am     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Jan 05, 2024 12:31 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Sat Jan 06, 2024 6:59 am     Reply with quote

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

View user's profile Send private message

PostPosted: Sun Jan 07, 2024 2:09 am     Reply with quote

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

View user's profile Send private message

PostPosted: Sun Jan 07, 2024 4:16 am     Reply with quote

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

View user's profile Send private message

PostPosted: Sun Jan 07, 2024 7:42 am     Reply with quote

Thank you. I will consider moving to 3.3V.
MCUprogrammer



Joined: 08 Sep 2020
Posts: 233

View user's profile Send private message

PostPosted: Wed Apr 24, 2024 9:09 am     Reply with quote

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

View user's profile Send private message Visit poster's website

PostPosted: Thu Jun 25, 2026 2:00 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Sat Jun 27, 2026 9:28 am     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group