---
title: "Surf 5 - Web server example in KEIL 5"
url: "https://maker.wiznet.io/TheoIm/projects/surf-5-web-server-example-in-keil-5/"
markdown_url: "https://maker.wiznet.io/TheoIm/projects/surf-5-web-server-example-in-keil-5/md"
type: "WCC: WIZnet Created Content"
author: "theo"
author_url: "https://maker.wiznet.io/TheoIm/"
original_author: "Theo"
published: "2024-02-07"
language: "en"
tags: ["surf5-contest-ref"]
likes: 7
views: 3057
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# Surf 5 - Web server example in KEIL 5

> Surf 5 - Web server example in KEIL 5

Original author: Theo

## Article

This project builds the Web example of Surf 5 in VS Code. It shows the process of flashing the extracted binary file to Surf 5 in boot mode using the ISP Tool and conducting a Web server test with Hercules.

**If you are experiencing difficulties with the process mentioned above, please refer to the link below.**

- [**Surf 5 Library**](https://github.com/Wiznet/W7500x-Surf5)

- [**ISP Tool**](https://maker.wiznet.io/jaden/projects/how%2Dto%2Dflash%2Dsurf5%2Dusing%2Disp%2Dtool/?serob=rd&serterm=month)

- [**How to make Surf 5 projects in Keil 5**](https://maker.wiznet.io/TheoIm/projects/how%2Dto%2Dmake%2Dsurf%2D5%2Dproject%2Din%2Dkeil%2D5/?serob=rd&serterm=month)

### **Hardware requirements**

Before starting this project, prepare Surf 5 and a micro 5-pin cable, as well as an Ethernet connected to the internet.

**Step 1: Prepare Software**

The following serial terminal program is required for **making web server** , download and install from below links.

- [**Hercules**](https://www.hw-group.com/software/hercules-setup-utility)

- **ISP Tool**

- **Web Browser(Chrome, MS Edge etc..)**

### **Step 2: Prepare hardware**

- Connect ethernet cable to Surf 5 ethernet port.

- Connect Surf 5 to desktop or laptop using 5 pin micro USB cable.

### **Step 3: Setup Web Server Example**

To test the **Web Server example**, Open the project file located at 'D:\projects\W7500x-Surf5\Projects\W7500x_StdPeriph_Templates\MDK' path.

![](https://maker.wiznet.io/upload/ckeditor5/57019074%5F1707228727%2Epng)

- In the project, right-click on main.c and press 'Remove File 'main.c'' to remove 'main.c'.

![](https://maker.wiznet.io/upload/ckeditor5/57019074%5F1707229049%2Epng)

- Right-click on the 'User' folder and click 'Add Existing Files to Group 'User'...'.

![](https://maker.wiznet.io/upload/ckeditor5/57019074%5F1707229234%2Epng)

- Add main.c from the 'W7500x-Surf5\Projects\W7500x_StdPeriph_Examples\WZTOE\WZTOE_WebServer' directory.

![](https://maker.wiznet.io/upload/ckeditor5/57019074%5F1707230165%2Epng)

- Press the 'F7' button to build.

![](https://maker.wiznet.io/upload/ckeditor5/57019074%5F1707229663%2Epng)

### **Step 4: Upload and Run**

### **Web Server Mode**

- Please turn on the '**W7500 ISP Tool**' for flashing.

![](https://maker.wiznet.io/upload/ckeditor5/57018711%5F1707211196%2Epng)

- Click the 'Browse' button in Step 5 of the tool. Then, select W7500x.bin located in the **'...\W7500x-Surf5\Projects\W7500x_StdPeriph_Templates\MDK' **path.

![](https://maker.wiznet.io/upload/ckeditor5/57018711%5F1707211563%2Epng)

![](https://maker.wiznet.io/upload/ckeditor5/57019074%5F1707230417%2Epng)

- Enter Surf 5 into boot mode and search for Surf 5's serial port, then press '**Open**'.

![](https://maker.wiznet.io/upload/ckeditor5/57018711%5F1707211821%2Epng)

- If the connection to the tool is successful, a successful connection message will appear as below.

![](https://maker.wiznet.io/upload/ckeditor5/57018711%5F1707211899%2Epng)

- Press the** 'Start All Steps'** button to start flashing.

![](https://maker.wiznet.io/upload/ckeditor5/57018711%5F1707211947%2Epng)

- Use Hercules to connect to Surf 5 and verify that the message indicating DHCP has started appears.

![](https://maker.wiznet.io/upload/ckeditor5/57018711%5F1707216916%2Epng)

- After a slight delay once DHCP assignment is made, the message 'DHCP Success' will appear along with the creation of the web server's address (IP: 192.168.xxx.xxx).

![](https://maker.wiznet.io/upload/ckeditor5/57018711%5F1707216928%2Epng)

- By entering the IP address assigned by DHCP into a web browser window, the ADC values will be displayed as follows. (The ADC port is GPIO port C, pins 12 to 15.)

![](https://maker.wiznet.io/upload/ckeditor5/57018711%5F1707217379%2Epng)

- The information of the client that accessed the web server from Hercules can be verified as follows.

![](https://maker.wiznet.io/upload/ckeditor5/57018711%5F1707217365%2Epng)

---

Source: https://maker.wiznet.io/TheoIm/projects/surf-5-web-server-example-in-keil-5/
