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: 19539

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: 1909

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: 19539

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: 19539

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: 221

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
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