---
title: "Using W5500 with PIC18F and MPLABX XC8 Compiler"
url: "https://maker.wiznet.io/forum/12806"
markdown_url: "https://maker.wiznet.io/forum/12806/md"
type: "Forum topic"
category: "Ethernet Chips"
author: "andig"
created: "2018-03-19T08:22:01+09:00"
last_activity: "2024-02-22T15:14:01+09:00"
language: "en"
views: 2954
replies: 6
source: "WIZnet Makers forum (https://maker.wiznet.io/forum/)"
---

# Using W5500 with PIC18F and MPLABX XC8 Compiler

## Question

Asked by andig on 2018-03-19 in Ethernet Chips.

Hi,
I cannot get the Microchip TCP/IP Lite Stack running on a PIC18F46K22 with a Wiznet W5500 module. I was taking the W5200 instructions for porting the existing library to use a W5500 instead of an ENC28J60.
I would like to implement MODBUS TCP server finally and a single socket connection is also okay. It is a commercial project and meant to be produced in thousands. We were originally using the PIC18F67J60. The design change is to offload the stack to Wiznet W5500 and gain some computing power to do other stuffs. Such as MODBUS RTU @9600 on the same chip.

If anybody have done this with a PIC18F I would be grateful for code examples or guide.

Best Regards

## Replies

### Reply 1 by Eugeny, 2018-03-19

andig:

> I cannot get the Microchip TCP/IP Lite Stack running on a PIC18F46K22 with a Wiznet W5500 module.

What does it exactly mean? What is the difference in relation to W5500 implementation between PIC18F67J60 and PIC18F46K22?

### Reply 2 by andig, 2018-03-19 (in reply to reply 1)

Hi Eugeny,

The PIC18F67J60 is a combination of **MCU and PHY**. It would be equivalent to **PIC18F46K22 + ENC24J60** In both the cases the TCP/IP stack is in software unlike W5500 where it in hardware.

Microchip supported the W5200 way back in 2013 then they removed it from their stack.

### Reply 3 by Eugeny, 2018-03-19

Ok, so we are clear about differences, but what

Eugeny:

> I cannot get the Microchip TCP/IP Lite Stack running

Actually means? You can not compile? Did you do any troubleshooting what is wrong?

### Reply 4 by andig, 2018-03-19

Yes lot of compile errors and seems my lack of knowledge on the Wiznet W5500. So I am looking forward to some running code examples that work with a PIC

### Reply 5 by andig, 2018-03-20

Anybody with a working source code of W5500 with a PIC microcontroller (18F/24F/dsPIC) that can be run on MPLABX ??

### Reply 6 by SVmetal, 2024-02-22

Hi, i am new with wiznet. I want use pic18F27k42 with w5500, have anybody some example how set wizchip_conf.c and some example code to test modul w5500? MPLAB, XC8… Thanks

---

Source: https://maker.wiznet.io/forum/12806
