Microchip TCP Stack Lab1

เครื่องมือที่ใช้สำหรับการทดลอง

  • บอร์ดทดลอง Microcontroller PIC32MX340F512H
  • MPLABX IDE 1.85
  • XC32 Compiler v1.21
  • TCP Stack Version: 5.42.08
  • PICKit3 Programmer, ICD3

บทนำ

สำหรับการพัฒนา Application ด้าน TCP/IP บริษัท Microchip ได้เตรียม TCP Stack Library ไว้ให้ผู้พัฒนาสามารถนำไปพัฒนาต่อได้ โดยไม่มีค่าใช้จ่ายใดๆ ข้อมูลเพิ่มเติม Microchip

Microchip TCP Stack

Microchip TCP Stack

ภาพด้านบนจะเห็นได้ว่า Microchip TCP IP Stack รองรับ Protocols ต่างที่ให้ผู้พัฒนาสามารถเข้าถึงการพัฒนาได้อย่างอิสระ เช่น ARP, IP, ICMP, UDP, TCP, DHCP, SNMP, FTP, TFTP, HTTP

สำหรับการเรียนรู้ในเอกสารที่ได้จัดทำนี้จะเริ่มเรียนรู้ Protocols ที่กล่าวมาในข้างต้นเพื่อที่จะสามารถนำ TCP Stack มาใช้ในการพัฒนางานด้าน Embedded System ตามความต้องการของผู้พัฒนา

วงจรที่ใช้

ทำการต่อวงจรบอร์ดทดลองตามลิงค์ http://www.10logic.com/microcontrollers/pic32mx340devboard ส่วนที่ต้องเพิ่มเติมเข้าไปคือ ENC28J60 Module

ENC28j60 Ethernet Interface Module

ENC28j60 Ethernet Interface Module

ซึ่งจะใช้ SPI2 สำหรับ Interface กับ ENC28H60 Module

 

เริ่มต้นการใช้งาน

ให้เข้าไปดาว์นโหลด Microchip Libraries for Applications หลังจากนั้นให้ทำการติดตั้ง Library ที่ต้องการใช้งานในที่นี้จะเลือกการติดตั้ง TCP Demo Application ลงไปด้วย หากไม่ได้เปลี่ยนแปลงตำแหน่งติดตั้งไฟล์ทั้งหมดจะอยู่ที่ตำแหน่ง ‪C:\microchip_solutions_v2013-06-15

Microchip Library

Microchip Library

เปิดโปรแกรม MPLABX และเปิดโปรเจ็ค TCP Demo App ขึ้นมา คลิกขวาที่ชื่อ TCP Demo App และคลิกเลือก Property และเลือก Manage Configurations> Set Active > OK

Microchip TCP Stack

Microchip TCP Stack

Microchip TCP Stack

Microchip TCP Stack

จากนั้นทดลอง Build โปรเจ็คซึ่งหากไม่มี Error ใดๆ จะปรากฏข้อความดังภาพด้านล่างนี้

Microchip TCP Stack

Microchip TCP Stack

รูปภาพแสดงการ Build จากภาพไม่มีข้อผิดพลาด ในที่นี้ จะใช้ Microcontroller เบอร์ PIC32MX340F512H ดังนั้นให้ทำการเปลี่ยน Microcontroller ใหม่ เลือก Project > Device > PIC32MX340F512H

Microchip TCP Stack

Microchip TCP Stack

และเปลี่ยน Heap Memory ในที่นี้ใช้ค่า 10240 bytes

Microchip TCP Stack

Microchip TCP Stack

เปลี่ยนค่า Configuration ของโปรเจ็ค หลักมีอยู่ 2 ไฟล์ที่ต้องเปลี่ยนคือไฟล์ ซึ่งอยู่ในโฟลเดอร์ Configs

  • HWP EX16_ENC28 XC32.h
  • TCPIP ENC28.h

HWP EX16_ENC28 XC32.h

 /*********************************************************************
 *
 *	Hardware specific definitions for:
 *    - Explorer 16
 *    - PIC32MX
 *    - Ethernet PICtail Plus (ENC28J60)
 *
 *********************************************************************
 * FileName:        HardwareProfile.h
 * Dependencies:    Compiler.h
 * Processor:       PIC32
 * Compiler:        Microchip C32 v1.11 or higher
 * Company:         Microchip Technology, Inc.
 *
 * Software License Agreement
 *
 * Copyright (C) 2002-2010 Microchip Technology Inc.  All rights
 * reserved.
 *
 * Microchip licenses to you the right to use, modify, copy, and
 * distribute:
 * (i)  the Software when embedded on a Microchip microcontroller or
 *      digital signal controller product ("Device") which is
 *      integrated into Licensee's product; or
 * (ii) ONLY the Software driver source files ENC28J60.c, ENC28J60.h,
 *		ENCX24J600.c and ENCX24J600.h ported to a non-Microchip device
 *		used in conjunction with a Microchip ethernet controller for
 *		the sole purpose of interfacing with the ethernet controller.
 *
 * You should refer to the license agreement accompanying this
 * Software for additional information regarding your rights and
 * obligations.
 *
 * THE SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT
 * WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
 * LIMITATION, ANY WARRANTY OF MERCHANTABILITY, FITNESS FOR A
 * PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL
 * MICROCHIP BE LIABLE FOR ANY INCIDENTAL, SPECIAL, INDIRECT OR
 * CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF
 * PROCUREMENT OF SUBSTITUTE GOODS, TECHNOLOGY OR SERVICES, ANY CLAIMS
 * BY THIRD PARTIES (INCLUDING BUT NOT LIMITED TO ANY DEFENSE
 * THEREOF), ANY CLAIMS FOR INDEMNITY OR CONTRIBUTION, OR OTHER
 * SIMILAR COSTS, WHETHER ASSERTED ON THE BASIS OF CONTRACT, TORT
 * (INCLUDING NEGLIGENCE), BREACH OF WARRANTY, OR OTHERWISE.
 *
 *
 * Author               Date		Comment
 *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 * Howard Schlunder		09/16/2010	Regenerated for specific boards
 ********************************************************************/
#ifndef HARDWARE_PROFILE_H
#define HARDWARE_PROFILE_H

#include "Compiler.h"

// Define a macro describing this hardware set up (used in other files)
#define EXPLORER_16

// Set configuration fuses (but only in MainDemo.c where THIS_IS_STACK_APPLICATION is defined)
#if defined(THIS_IS_STACK_APPLICATION)
//    #pragma config FPLLODIV = DIV_1, FPLLMUL = MUL_20, FPLLIDIV = DIV_2, FWDTEN = OFF, FPBDIV = DIV_1, POSCMOD = XT, FNOSC = PRIPLL, CP = OFF
    #pragma config FPLLODIV = DIV_1, FPLLMUL = MUL_20, FPLLIDIV = DIV_2, FWDTEN = OFF, FPBDIV = DIV_1, POSCMOD = XT, FNOSC = PRIPLL, CP = OFF
#endif

// Clock frequency values
// These directly influence timed events using the Tick module.  They also are used for UART and SPI baud rate generation.
#define GetSystemClock()		(80000000ul)			// Hz
#define GetInstructionClock()	(GetSystemClock()/1)	// Normally GetSystemClock()/4 for PIC18, GetSystemClock()/2 for PIC24/dsPIC, and GetSystemClock()/1 for PIC32.  Might need changing if using Doze modes.
#define GetPeripheralClock()	(GetSystemClock()/1)	// Normally GetSystemClock()/4 for PIC18, GetSystemClock()/2 for PIC24/dsPIC, and GetSystemClock()/1 for PIC32.  Divisor may be different if using a PIC32 since it's configurable.

// Hardware I/O pin mappings
// LEDs

#define LED0_TRIS			(TRISEbits.TRISE0)	// Ref D3
#define LED1_TRIS			(TRISEbits.TRISE1)	// Ref D3
#define LED2_TRIS			(TRISEbits.TRISE2)	// Ref D3
#define LED3_TRIS			(TRISEbits.TRISE3)	// Ref D3
#define LED4_TRIS			(TRISEbits.TRISE4)	// Ref D3
#define LED5_TRIS			(TRISEbits.TRISE5)	// Ref D3
#define LED6_TRIS			(TRISEbits.TRISE6)	// Ref D3
#define LED7_TRIS			(TRISEbits.TRISE7)	// Ref D3

#define LED0_IO                         (LATEbits.LATE0)
#define LED1_IO                         (LATEbits.LATE1)
#define LED2_IO                         (LATEbits.LATE2)
#define LED3_IO                         (LATEbits.LATE3)
#define LED4_IO                         (LATEbits.LATE4)
#define LED5_IO                         (LATEbits.LATE5)
#define LED6_IO                         (LATEbits.LATE6)
#define LED7_IO                         (LATEbits.LATE7)

#define LED_GET()			(*((volatile unsigned char*)(&LATE)))
#define LED_PUT(a)			(*((volatile unsigned char*)(&LATE)) = (a))

// Momentary push buttons
#define BUTTON0_TRIS                    (TRISBbits.TRISB11)	// Ref S4
#define	BUTTON0_IO			(PORTBbits.RB11)
#define BUTTON1_TRIS                    (TRISBbits.TRISB12)	// Ref S5	// Note: This is multiplexed with LED7
#define	BUTTON1_IO			(PORTBbits.RB12)
#define BUTTON2_TRIS                    (TRISBbits.TRISB13)	// Ref S6
#define	BUTTON2_IO			(PORTBbits.RB13)
#define BUTTON3_TRIS                    (TRISBbits.TRISB14)	// Ref S3
#define	BUTTON3_IO			(PORTBbits.RB14)

#define UARTTX_TRIS			(TRISFbits.TRISF5)
#define UARTTX_IO			(PORTFbits.RF5)
#define UARTRX_TRIS			(TRISFbits.TRISF4)
#define UARTRX_IO			(PORTFbits.RF4)

//#define VETHON_TRIS			TRISAbits.TRISA9
//#define VETHON_LAT			LATAbits.LATA9

// ENC28J60 I/O pins
#define ENC_RST_TRIS                    (TRISFbits.TRISF1)	// Not connected by default
#define ENC_RST_IO			(PORTFbits.RF1)
#define ENC_CS_TRIS			(TRISGbits.TRISG9)
#define ENC_CS_IO			(PORTGbits.RG9)
#define ENC_SPI_IF			(IFS1bits.SPI2RXIF)
#define ENC_SSPBUF			(SPI2BUF)
#define ENC_SPISTATbits                 (SPI2STATbits)
#define ENC_SPICON1			(SPI2CON)
#define ENC_SPICON1bits                 (SPI2CONbits)
#define ENC_SPIBRG			(SPI2BRG)

// 25LC256 I/O pins
#define EEPROM_CS_TRIS                  (TRISFbits.TRISF1)
#define EEPROM_CS_IO                    (LATFbits.LATF1)
#define EEPROM_SCK_TRIS                 (TRISFbits.TRISF6)
#define EEPROM_SDI_TRIS                 (TRISFbits.TRISF2)
#define EEPROM_SDO_TRIS                 (TRISFbits.TRISF3)
#define EEPROM_SPI_IF                   (IFS0bits.SPI1RXIF)
#define EEPROM_SSPBUF                   (SPI1BUF)
#define EEPROM_SPICON1                  (SPI1CON)
#define EEPROM_SPICON1bits              (SPI1CONbits)
#define EEPROM_SPIBRG                   (SPI1BRG)
#define EEPROM_SPISTAT                  (SPI1STAT)
#define EEPROM_SPISTATbits              (SPI1STATbits)

// LCD Module I/O pins.  NOTE: On the Explorer 16, the LCD is wired to the 
// same PMP lines required to communicate with an ENCX24J600 in parallel 
// mode.  Since the LCD does not have a chip select wire, if you are using 
// the ENC424J600/624J600 in parallel mode, the LCD cannot be used.
#if !defined(ENC100_INTERFACE_MODE) || (ENC100_INTERFACE_MODE == 0)	// SPI only
//	#define LCD_DATA_TRIS		(*((volatile unsigned char*)&TRISE))
//	#define LCD_DATA_IO			(*((volatile unsigned char*)&LATE))
//	#define LCD_RD_WR_TRIS		(TRISDbits.TRISD5)
//	#define LCD_RD_WR_IO		(LATDbits.LATD5)
//	#define LCD_RS_TRIS			(TRISBbits.TRISB15)
//	#define LCD_RS_IO			(LATBbits.LATB15)
//	#define LCD_E_TRIS			(TRISDbits.TRISD4)
//	#define LCD_E_IO			(LATDbits.LATD4)
#endif

#ifdef __PIC32MX__
    // Registers for the SPI module you want to use
    #define MDD_USE_SPI_1
    //#define MDD_USE_SPI_2

    //SPI Configuration
    #define SPI_START_CFG_1     (PRI_PRESCAL_64_1 | SEC_PRESCAL_8_1 | MASTER_ENABLE_ON | SPI_CKE_ON | SPI_SMP_ON)
    #define SPI_START_CFG_2     (SPI_ENABLE)

    // Define the SPI frequency
    #define SPI_FREQUENCY			(20000000)

    #if defined MDD_USE_SPI_1
            #warning "MDD_USE_SPI_1"

            // Description: SD-SPI Chip Select Output bit
            #define SD_CS               LATBbits.LATB3
            // Description: SD-SPI Chip Select TRIS bit
            #define SD_CS_TRIS          TRISBbits.TRISB3

            // Description: SD-SPI Card Detect Input bit
            #define SD_CD               PORTBbits.RB1
            // Description: SD-SPI Card Detect TRIS bit
            #define SD_CD_TRIS          TRISBbits.TRISB1

            // Description: SD-SPI Write Protect Check Input bit
            #define SD_WE               PORTBbits.RB0
            // Description: SD-SPI Write Protect Check TRIS bit
            #define SD_WE_TRIS          TRISBbits.TRISB0

            // Description: The main SPI control register
            #define SPICON1             SPI1CON
            // Description: The SPI status register
            #define SPISTAT             SPI1STAT
            // Description: The SPI Buffer
            #define SPIBUF              SPI1BUF
            // Description: The receive buffer full bit in the SPI status register
            #define SPISTAT_RBF         SPI1STATbits.SPIRBF
            // Description: The bitwise define for the SPI control register (i.e. _____bits)
            #define SPICON1bits         SPI1CONbits
            // Description: The bitwise define for the SPI status register (i.e. _____bits)
            #define SPISTATbits         SPI1STATbits
            // Description: The enable bit for the SPI module
            #define SPIENABLE           SPICON1bits.ON
            // Description: The definition for the SPI baud rate generator register (PIC32)
            #define SPIBRG			    SPI1BRG

            // Tris pins for SCK/SDI/SDO lines

            // Description: The TRIS bit for the SCK pin
            #define SPICLOCK            TRISFbits.TRISF6
            // Description: The TRIS bit for the SDI pin
            #define SPIIN               TRISFbits.TRISF2
            // Description: The TRIS bit for the SDO pin
            #define SPIOUT              TRISFbits.TRISF3
            //SPI library functions
            #define putcSPI             putcSPI1
            #define getcSPI             getcSPI1
            #define OpenSPI(config1, config2)   OpenSPI1(config1, config2)

    #elif defined MDD_USE_SPI_2
            #warning "MDD_USE_SPI_2"
            // Description: SD-SPI Chip Select Output bit
            #define SD_CS               LATBbits.LATB9
            // Description: SD-SPI Chip Select TRIS bit
            #define SD_CS_TRIS          TRISBbits.TRISB9

            // Description: SD-SPI Card Detect Input bit
            #define SD_CD               PORTGbits.RG0
            // Description: SD-SPI Card Detect TRIS bit
            #define SD_CD_TRIS          TRISGbits.TRISG0

            // Description: SD-SPI Write Protect Check Input bit
            #define SD_WE               PORTGbits.RG1
            // Description: SD-SPI Write Protect Check TRIS bit
            #define SD_WE_TRIS          TRISGbits.TRISG1

            // Description: The main SPI control register
            #define SPICON1             SPI2CON
            // Description: The SPI status register
            #define SPISTAT             SPI2STAT
            // Description: The SPI Buffer
            #define SPIBUF              SPI2BUF
            // Description: The receive buffer full bit in the SPI status register
            #define SPISTAT_RBF         SPI2STATbits.SPIRBF
            // Description: The bitwise define for the SPI control register (i.e. _____bits)
            #define SPICON1bits         SPI2CONbits
            // Description: The bitwise define for the SPI status register (i.e. _____bits)
            #define SPISTATbits         SPI2STATbits
            // Description: The enable bit for the SPI module
            #define SPIENABLE           SPI2CONbits.ON
            // Description: The definition for the SPI baud rate generator register (PIC32)
            #define SPIBRG			    SPI2BRG

            // Tris pins for SCK/SDI/SDO lines

            // Description: The TRIS bit for the SCK pin
            #define SPICLOCK            TRISGbits.TRISG6
            // Description: The TRIS bit for the SDI pin
            #define SPIIN               TRISGbits.TRISG7
            // Description: The TRIS bit for the SDO pin
            #define SPIOUT              TRISGbits.TRISG8
            //SPI library functions
            #define putcSPI             putcSPI2
            #define getcSPI             getcSPI2
            #define OpenSPI(config1, config2)   OpenSPI2(config1, config2)
    #endif
    // Will generate an error if the clock speed is too low to interface to the card
    #if (GetSystemClock() < 100000)
            #error Clock speed must exceed 100 kHz
    #endif

#endif

// Select which UART the STACK_USE_UART and STACK_USE_UART2TCP_BRIDGE 
// options will use.  You can change these to U1BRG, U1MODE, etc. if you 
// want to use the UART1 module instead of UART2.
#define UBRG				U2BRG
#define UMODE				U2MODE
#define USTA				U2STA
#define BusyUART()			BusyUART2()
#define CloseUART()			CloseUART2()
#define ConfigIntUART(a)	ConfigIntUART2(a)
#define DataRdyUART()		DataRdyUART2()
#define OpenUART(a,b,c)		OpenUART2(a,b,c)
#define ReadUART()			ReadUART2()
#define WriteUART(a)		WriteUART2(a)
#define getsUART(a,b,c)		getsUART2(a,b,c)
#define putsUART(a)			putsUART2(a)
#define getcUART()			getcUART2()
#define putcUART(a)			do{while(BusyUART()); WriteUART(a); while(BusyUART()); }while(0)
#define putrsUART(a)		putrsUART2(a)

#endif // #ifndef HARDWARE_PROFILE_H

TCPIP ENC28.h

เป็นไฟล์สำหรับปิดหรือเปิด Application ของ TCP Stack ที่สำคัญที่ #define STACK_USE_MPFS2 เมื่อเปิดแล้วให้เลือกเปิด

#define MPFS_USE_EEPROM หรือ #define MPFS_USE_SPI_FLASH หรือ #define USE_EEPROM_25LC1024 อย่างใดอย่างหนึ่งเท่านั้น

#define MPFS_USE_EEPROM       เก็บค่า Config และเว็บไว้ใน EEPROM
#define MPFS_USE_SPI_FLASH    เก็บค่า Config และเว็บไว้ใน serial flash No. SST25VFxxxB
#define USE_EEPROM_25LC1024 เก็บค่า Config และเว็บไว้ใน EEPROM ขนาด 1024 Kbit

ซึ่งในที่ในเปิดแบบ #define MPFS_USE_EEPROM ค่า Config จะจัดเก็บใน EEPROM 25LC512 และเว็บจะถูกจัดเก็บไว้ใน EEPROM เช่นกันซึ่งหากพัฒนาเกี่ยวกับ Web Server ต้องคำถึงขนาดของ Memory ที่เหลือเพื่อจัดเก็บไฟล์ของ Web Server ด้วย

มาโครอื่นๆในไฟล์ TCPIP ENC28.h

ชื่อ Macro รายละเอียด
#define STACK_USE_UART มาโครเพื่อให้ใช้งาน UART
#define STACK_USE_UART2TCP_BRIDGE มาโคร UART Bridge To TCP
#define STACK_USE_ICMP_SERVER มาโครเพื่อเปิด ICMP Server
#define STACK_USE_ICMP_CLIENT มาโครเพื่อเปิด ICMP Client
#define STACK_USE_HTTP2_SERVER มาโครเพื่อเปิด HTTP Server
#define STACK_USE_SSL_SERVER มาโครเพื่อเปิด SSL Server
#define STACK_USE_SSL_CLIENT มาโครเพื่อเปิด SSL Client
#define STACK_USE_AUTO_IP มาโครเพื่อให้ทำงานเปลี่ยน IP ใหม่
#define STACK_USE_DHCP_CLIENT มาโครเพื่อเปิดรับ DHCP
#define STACK_USE_DHCP_SERVER มาโครเพื่อให้ Stack ทำงานเป็น DHCP Server
#define STACK_USE_FTP_SERVER มาโครเพื่อเปิดให้ FTP Server ทำงาน
#define STACK_USE_SMTP_CLIENT มาโครเพื่อเปิดให้สามารถส่ง Email ได้
#define STACK_USE_TFTP_CLIENT มาโครเพื่อเปิดให้ TFTP Client ทำงาน
#define STACK_USE_GENERIC_TCP_CLIENT_EXAMPLE มาโครเพื่อเปิดให้ตัวอย่างการทำงานของ TCP Client ทำงาน
#define STACK_USE_GENERIC_TCP_SERVER_EXAMPLE มาโครเพื่อเปิดให้ตัวอย่างการทำงานของ TCP Server ทำงาน
#define STACK_USE_TELNET_SERVER มาโครเพื่อเปิดให้ Telnet Server ทำงาน
#define STACK_USE_ANNOUNCE มาโครเพื่อเปิดให้โปรแกรม Discovery บน PC Monitor บอร์ดได้
#define STACK_USE_DNS มาโครเพื่อให้ DNS ทำงาน
#define STACK_USE_NBNS มาโครกำหนดชื่อโฮต(ชื่อของบอร์ดทดลอง)
#define STACK_USE_REBOOT_SERVER มาโครเพื่อให้สามารถ Reboot บอร์ดทดลองได้
#define STACK_USE_SNTP_CLIENT มาโครเพื่อเปิดให้สามารถใช้งาน SNTP ได้
#define STACK_USE_UDP_PERFORMANCE_TEST มาโครเพื่อเปิดตัวอย่าง UDP ให้ทำงาน
#define STACK_USE_TCP_PERFORMANCE_TEST มาโครเพื่อเปิดตัวอย่าง TCPPROMANCE_TEST ทำงาน
#define STACK_USE_DYNAMICDNS_CLIENT Dynamic DNS
#define STACK_USE_BERKELEY_API Berkeley Sockets API
#define STACK_USE_MPFS2 เมื่อไม่ได้ Comment นี้ไฟล์จัดเก็บข้อมูลเว็บไว้ใน CHIP
#define MPFS_USE_EEPROM ใช้ EEPROM เก็บข้อมูล Structure Configuration ต่างๆ
#define MPFS_USE_SPI_FLASH ใช้ SPI_FLASH เก็บข้อมูล Structure Configuration ต่างๆ
#define USE_EEPROM_25LC1024 ใช้ EEPROM_25LC1024 ความเร็ว 1Mbit
#define MY_DEFAULT_HOST_NAME ชื่อโฮต
#define MAX_UDP_SOCKETS     (8u) เปิดเพื่อให้สามารถใช้ UDP Sock ได้สูงสุดจำนวน 8 Socket
#define MAX_HTTP_CONNECTIONS          (2u) อนุญาตให้ Client เข้า Access ได้สูงสุดจำนวน 2 Client
 
รายละเอียดด้าน HTTP
#define HTTP_USE_POST Enable Post Support
#define HTTP_USE_COOKIES Enable Cookie Support
#define HTTP_USE_AUTHENTICATION Enable basic authentication support
#define HTTP_PORT (80u) HTTP พอร์ต
#define HTTPS_PORT (443u) HTTPS พอร์ต
#define HTTP_MAX_DATA_LEN (100u) ความยาวของข้อมูล GET/POST
#define STACK_USE_HTTP_APP_RECONFIG Use the AppConfig
#define STACK_USE_HTTP_MD5_DEMO Use the MD5 Demo web page
#define STACK_USE_HTTP_EMAIL_DEMO Use the e-mail demo web page
 
รายละเอียดด้าน Telnet
#define MAX_TELNET_CONNECTIONS       (1u) จำนวน Connection
#define TELNET_PORT   23 Port for the Telnet server
#define TELNETS_PORT  992 Port for the Telnet server when SSL
#define TELNET_USERNAME “admin”
/*********************************************************************
 *
 *	Microchip TCP/IP Stack Demo Application Configuration Header
 *
 *********************************************************************
 * FileName:        TCPIPConfig.h
 * Dependencies:    Microchip TCP/IP Stack
 * Processor:       PIC18, PIC24F, PIC24H, dsPIC30F, dsPIC33F, PIC32
 * Compiler:        Microchip C32 v1.10 or higher
 *					Microchip C30 v3.12 or higher
 *					Microchip C18 v3.34 or higher
 *					HI-TECH PICC-18 PRO 9.63PL2 or higher
 * Company:         Microchip Technology, Inc.
 *
 * Software License Agreement
 *
 * Copyright (C) 2002-2010 Microchip Technology Inc.  All rights
 * reserved.
 *
 * Microchip licenses to you the right to use, modify, copy, and
 * distribute:
 * (i)  the Software when embedded on a Microchip microcontroller or
 *      digital signal controller product ("Device") which is
 *      integrated into Licensee's product; or
 * (ii) ONLY the Software driver source files ENC28J60.c, ENC28J60.h,
 *		ENCX24J600.c and ENCX24J600.h ported to a non-Microchip device
 *		used in conjunction with a Microchip ethernet controller for
 *		the sole purpose of interfacing with the ethernet controller.
 *
 * You should refer to the license agreement accompanying this
 * Software for additional information regarding your rights and
 * obligations.
 *
 * THE SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT
 * WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
 * LIMITATION, ANY WARRANTY OF MERCHANTABILITY, FITNESS FOR A
 * PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL
 * MICROCHIP BE LIABLE FOR ANY INCIDENTAL, SPECIAL, INDIRECT OR
 * CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF
 * PROCUREMENT OF SUBSTITUTE GOODS, TECHNOLOGY OR SERVICES, ANY CLAIMS
 * BY THIRD PARTIES (INCLUDING BUT NOT LIMITED TO ANY DEFENSE
 * THEREOF), ANY CLAIMS FOR INDEMNITY OR CONTRIBUTION, OR OTHER
 * SIMILAR COSTS, WHETHER ASSERTED ON THE BASIS OF CONTRACT, TORT
 * (INCLUDING NEGLIGENCE), BREACH OF WARRANTY, OR OTHERWISE.
 *
 *
 * V5.36   ---- STACK_USE_MPFS support has been removed 
 ********************************************************************/
#ifndef __TCPIPCONFIG_H
#define __TCPIPCONFIG_H

#include "GenericTypeDefs.h"
#include "Compiler.h"
#define GENERATED_BY_TCPIPCONFIG "Version 1.0.3383.23374"

// =======================================================================
//   Application Options
// =======================================================================

/* Application Level Module Selection
 *   Uncomment or comment the following lines to enable or
 *   disabled the following high-level application modules.
 */
#define STACK_USE_UART					// Application demo using UART for IP address display and stack configuration
#define STACK_USE_UART2TCP_BRIDGE		// UART to TCP Bridge application example
//#define STACK_USE_IP_GLEANING
#define STACK_USE_ICMP_SERVER			// Ping query and response capability
#define STACK_USE_ICMP_CLIENT			// Ping transmission capability
#define STACK_USE_HTTP2_SERVER			// New HTTP server with POST, Cookies, Authentication, etc.
//#define STACK_USE_SSL_SERVER			// SSL server socket support (Requires SW300052)
//#define STACK_USE_SSL_CLIENT			// SSL client socket support (Requires SW300052)
//#define STACK_USE_AUTO_IP               // Dynamic link-layer IP address automatic configuration protocol
//#define STACK_USE_DHCP_CLIENT			// Dynamic Host Configuration Protocol client for obtaining IP address and other parameters
//#define STACK_USE_DHCP_SERVER			// Single host DHCP server
//#define STACK_USE_FTP_SERVER			// File Transfer Protocol (old)
#define STACK_USE_SMTP_CLIENT			// Simple Mail Transfer Protocol for sending email
//#define STACK_USE_SNMP_SERVER			// Simple Network Management Protocol v2C Community Agent
//#define STACK_USE_SNMPV3_SERVER			// Simple Network Management Protocol v3 Agent
//#define STACK_USE_TFTP_CLIENT			// Trivial File Transfer Protocol client
//#define STACK_USE_GENERIC_TCP_CLIENT_EXAMPLE	// HTTP Client example in GenericTCPClient.c
#define STACK_USE_GENERIC_TCP_SERVER_EXAMPLE	// ToUpper server example in GenericTCPServer.c
#define STACK_USE_TELNET_SERVER			// Telnet server
#define STACK_USE_ANNOUNCE				// Microchip Embedded Ethernet Device Discoverer server/client
#define STACK_USE_DNS					// Domain Name Service Client for resolving hostname strings to IP addresses
//#define STACK_USE_DNS_SERVER			// Domain Name Service Server for redirection to the local device
#define STACK_USE_NBNS					// NetBIOS Name Service Server for repsonding to NBNS hostname broadcast queries
#define STACK_USE_REBOOT_SERVER			// Module for resetting this PIC remotely.  Primarily useful for a Bootloader.
#define STACK_USE_SNTP_CLIENT			// Simple Network Time Protocol for obtaining current date/time from Internet
//#define STACK_USE_UDP_PERFORMANCE_TEST	// Module for testing UDP TX performance characteristics.  NOTE: Enabling this will cause a huge amount of UDP broadcast packets to flood your network on the discard port.  Use care when enabling this on production networks, especially with VPNs (could tunnel broadcast traffic across a limited bandwidth connection).
//#define STACK_USE_TCP_PERFORMANCE_TEST	// Module for testing TCP TX performance characteristics
//#define STACK_USE_DYNAMICDNS_CLIENT		// Dynamic DNS client updater module
//#define STACK_USE_BERKELEY_API			// Berekely Sockets APIs are available
//#define STACK_USE_ZEROCONF_LINK_LOCAL	// Zeroconf IPv4 Link-Local Addressing
//#define STACK_USE_ZEROCONF_MDNS_SD		// Zeroconf mDNS and mDNS service discovery

// =======================================================================
//   Data Storage Options
// =======================================================================

/* MPFS Configuration
 *   MPFS is automatically included when required for other
 *   applications.  If your custom application requires it
 *   otherwise, uncomment the appropriate selection.
 */
#define STACK_USE_MPFS2

/* MPFS Storage Location
 *   If html pages are stored in internal program memory,
 *   comment both MPFS_USE_EEPROM and MPFS_USE_SPI_FLASH, then
 *   include an MPFS image (.c or .s file) in the project.
 *   If html pages are stored in external memory, uncomment the
 *   appropriate definition.
 *
 *   Supported serial flash parts include the SST25VFxxxB series.
 */
#define MPFS_USE_EEPROM
//#define MPFS_USE_SPI_FLASH

/* EEPROM Addressing Selection
 *   If using the 1Mbit EEPROM, uncomment this line
 */
//#define USE_EEPROM_25LC1024

/* EEPROM Reserved Area
 *   Number of EEPROM bytes to be reserved before MPFS storage starts.
 *   These bytes host application configurations such as IP Address,
 *   MAC Address, and any other required variables.
 *
 *   For MPFS Classic, this setting must match the Reserved setting
 *	 on the Advanced Settings page of the MPFS2 Utility.
 */
#define MPFS_RESERVE_BLOCK				(137ul)

/* MPFS File Handles
 *   Maximum number of simultaneously open MPFS2 files.
 *   For MPFS Classic, this has no effect.
 */
#define MAX_MPFS_HANDLES				(7ul)

// =======================================================================
//   Network Addressing Options
// =======================================================================

/* Default Network Configuration
 *   These settings are only used if data is not found in EEPROM.
 *   To clear EEPROM, hold BUTTON0, reset the board, and continue
 *   holding until the LEDs flash.  Release, and reset again.
 */
#define MY_DEFAULT_HOST_NAME			"MCHPBOARD"

#define MY_DEFAULT_MAC_BYTE1            (0x00)	// Use the default of 00-04-A3-00-00-00
#define MY_DEFAULT_MAC_BYTE2            (0x04)	// if using an ENCX24J600, MRF24WB0M, or
#define MY_DEFAULT_MAC_BYTE3            (0xA3)	// PIC32MX6XX/7XX internal Ethernet 
#define MY_DEFAULT_MAC_BYTE4            (0x00)	// controller and wish to use the 
#define MY_DEFAULT_MAC_BYTE5            (0x00)	// internal factory programmed MAC
#define MY_DEFAULT_MAC_BYTE6            (0x01)	// address instead.

#define MY_DEFAULT_IP_ADDR_BYTE1        (192ul)
#define MY_DEFAULT_IP_ADDR_BYTE2        (168ul)
#define MY_DEFAULT_IP_ADDR_BYTE3        (1ul)
#define MY_DEFAULT_IP_ADDR_BYTE4        (10ul)

#define MY_DEFAULT_MASK_BYTE1           (255ul)
#define MY_DEFAULT_MASK_BYTE2           (255ul)
#define MY_DEFAULT_MASK_BYTE3           (255ul)
#define MY_DEFAULT_MASK_BYTE4           (0ul)

#define MY_DEFAULT_GATE_BYTE1           (192ul)
#define MY_DEFAULT_GATE_BYTE2           (168ul)
#define MY_DEFAULT_GATE_BYTE3           (1ul)
#define MY_DEFAULT_GATE_BYTE4           (1ul)

#define MY_DEFAULT_PRIMARY_DNS_BYTE1	(192ul)
#define MY_DEFAULT_PRIMARY_DNS_BYTE2	(168ul)
#define MY_DEFAULT_PRIMARY_DNS_BYTE3	(1ul)
#define MY_DEFAULT_PRIMARY_DNS_BYTE4	(1ul)

#define MY_DEFAULT_SECONDARY_DNS_BYTE1	(0ul)
#define MY_DEFAULT_SECONDARY_DNS_BYTE2	(0ul)
#define MY_DEFAULT_SECONDARY_DNS_BYTE3	(0ul)
#define MY_DEFAULT_SECONDARY_DNS_BYTE4	(0ul)

// =======================================================================
//   PIC32MX7XX/6XX MAC Layer Options
//   If not using a PIC32MX7XX/6XX device, ignore this section.
// =======================================================================
#define	ETH_CFG_LINK			0		// set to 1 if you need to config the link to specific following parameters
										// otherwise the default connection will be attempted
										// depending on the selected PHY
	#define	ETH_CFG_AUTO		1		// use auto negotiation
	#define	ETH_CFG_10			1		// use/advertise 10 Mbps capability
	#define	ETH_CFG_100			1		// use/advertise 100 Mbps capability
	#define	ETH_CFG_HDUPLEX		1		// use/advertise half duplex capability
	#define	ETH_CFG_FDUPLEX		1		// use/advertise full duplex capability
	#define	ETH_CFG_AUTO_MDIX	1		// use/advertise auto MDIX capability
	#define	ETH_CFG_SWAP_MDIX	1		// use swapped MDIX. else normal MDIX

#define EMAC_TX_DESCRIPTORS		2		// number of the TX descriptors to be created
#define EMAC_RX_DESCRIPTORS		8		// number of the RX descriptors and RX buffers to be created

#define	EMAC_RX_BUFF_SIZE		1536	// size of a RX buffer. should be multiple of 16
										// this is the size of all receive buffers processed by the ETHC
										// The size should be enough to accomodate any network received packet
										// If the packets are larger, they will have to take multiple RX buffers
										// The current implementation does not handle this situation right now and the packet is discarded.

// =======================================================================
//   Transport Layer Options
// =======================================================================

/* Transport Layer Configuration
 *   The following low level modules are automatically enabled
 *   based on module selections above.  If your custom module
 *   requires them otherwise, enable them here.
 */
//#define STACK_USE_TCP
//#define STACK_USE_UDP

/* Client Mode Configuration
 *   Uncomment following line if this stack will be used in CLIENT
 *   mode.  In CLIENT mode, some functions specific to client operation
 *   are enabled.
 */
#define STACK_CLIENT_MODE

/* TCP Socket Memory Allocation
 *   TCP needs memory to buffer incoming and outgoing data.  The
 *   amount and medium of storage can be allocated on a per-socket
 *   basis using the example below as a guide.
 */
	// Allocate how much total RAM (in bytes) you want to allocate
	// for use by your TCP TCBs, RX FIFOs, and TX FIFOs.
	#define TCP_ETH_RAM_SIZE					(3900ul)
	#define TCP_PIC_RAM_SIZE					(0ul)
	#define TCP_SPI_RAM_SIZE					(0ul)
	#define TCP_SPI_RAM_BASE_ADDRESS			(0x00)

	// Define names of socket types
	#define TCP_SOCKET_TYPES
		#define TCP_PURPOSE_GENERIC_TCP_CLIENT 0
		#define TCP_PURPOSE_GENERIC_TCP_SERVER 1
		#define TCP_PURPOSE_TELNET 2
		#define TCP_PURPOSE_FTP_COMMAND 3
		#define TCP_PURPOSE_FTP_DATA 4
		#define TCP_PURPOSE_TCP_PERFORMANCE_TX 5
		#define TCP_PURPOSE_TCP_PERFORMANCE_RX 6
		#define TCP_PURPOSE_UART_2_TCP_BRIDGE 7
		#define TCP_PURPOSE_HTTP_SERVER 8
		#define TCP_PURPOSE_DEFAULT 9
		#define TCP_PURPOSE_BERKELEY_SERVER 10
		#define TCP_PURPOSE_BERKELEY_CLIENT 11
	#define END_OF_TCP_SOCKET_TYPES

	#if defined(__TCP_C)
		// Define what types of sockets are needed, how many of
		// each to include, where their TCB, TX FIFO, and RX FIFO
		// should be stored, and how big the RX and TX FIFOs should
		// be.  Making this initializer bigger or smaller defines
		// how many total TCP sockets are available.
		//
		// Each socket requires up to 56 bytes of PIC RAM and
		// 48+(TX FIFO size)+(RX FIFO size) bytes of TCP_*_RAM each.
		//
		// Note: The RX FIFO must be at least 1 byte in order to
		// receive SYN and FIN messages required by TCP.  The TX
		// FIFO can be zero if desired.
		#define TCP_CONFIGURATION
		ROM struct
		{
			BYTE vSocketPurpose;
			BYTE vMemoryMedium;
			WORD wTXBufferSize;
			WORD wRXBufferSize;
		} TCPSocketInitializer[] =
		{		
			{TCP_PURPOSE_GENERIC_TCP_CLIENT, TCP_ETH_RAM, 125, 100},
			{TCP_PURPOSE_GENERIC_TCP_SERVER, TCP_ETH_RAM, 20, 20},
			{TCP_PURPOSE_TELNET, TCP_ETH_RAM, 200, 150},
			//{TCP_PURPOSE_TELNET, TCP_ETH_RAM, 200, 150},
			//{TCP_PURPOSE_TELNET, TCP_ETH_RAM, 200, 150},
			//{TCP_PURPOSE_FTP_COMMAND, TCP_ETH_RAM, 100, 40},
			//{TCP_PURPOSE_FTP_DATA, TCP_ETH_RAM, 0, 128},
			{TCP_PURPOSE_TCP_PERFORMANCE_TX, TCP_ETH_RAM, 200, 1},
			//{TCP_PURPOSE_TCP_PERFORMANCE_RX, TCP_ETH_RAM, 40, 1500},
			{TCP_PURPOSE_UART_2_TCP_BRIDGE, TCP_ETH_RAM, 256, 256},
			{TCP_PURPOSE_HTTP_SERVER, TCP_ETH_RAM, 200, 200},
			{TCP_PURPOSE_HTTP_SERVER, TCP_ETH_RAM, 200, 200},
			{TCP_PURPOSE_DEFAULT, TCP_ETH_RAM, 200, 200},
			{TCP_PURPOSE_BERKELEY_SERVER, TCP_ETH_RAM, 25, 20},
			//{TCP_PURPOSE_BERKELEY_SERVER, TCP_ETH_RAM, 25, 20},
			//{TCP_PURPOSE_BERKELEY_SERVER, TCP_ETH_RAM, 25, 20},
			//{TCP_PURPOSE_BERKELEY_CLIENT, TCP_ETH_RAM, 125, 100},
		};
		#define END_OF_TCP_CONFIGURATION
	#endif

/* UDP Socket Configuration
 *   Define the maximum number of available UDP Sockets, and whether
 *   or not to include a checksum on packets being transmitted.
 */
#define MAX_UDP_SOCKETS     (8u)
#define UDP_USE_TX_CHECKSUM		// This slows UDP TX performance by nearly 50%, except when using the ENCX24J600 or PIC32MX6XX/7XX, which have a super fast DMA and incurs virtually no speed pentalty.

/* Berkeley API Sockets Configuration
 *   Note that each Berkeley socket internally uses one TCP or UDP socket
 *   defined by MAX_UDP_SOCKETS and the TCPSocketInitializer[] array.
 *   Therefore, this number MUST be less than or equal to MAX_UDP_SOCKETS + the
 *   number of TCP sockets defined by the TCPSocketInitializer[] array
 *   (i.e. sizeof(TCPSocketInitializer)/sizeof(TCPSocketInitializer[0])).
 *   This define has no effect if STACK_USE_BERKELEY_API is not defined and
 *   Berkeley Sockets are disabled.  Set this value as low as your application
 *   requires to avoid waisting RAM.
 */
#define BSD_SOCKET_COUNT (5u)

// =======================================================================
//   Application-Specific Options
// =======================================================================

// -- HTTP2 Server options -----------------------------------------------

	// Maximum numbers of simultaneous HTTP connections allowed.
	// Each connection consumes 2 bytes of RAM and a TCP socket
	#define MAX_HTTP_CONNECTIONS	(2u)

	// Optional setting to use PIC RAM instead of Ethernet/Wi-Fi RAM for
	// storing HTTP Connection Context variables (HTTP_CONN structure for each 
	// HTTP connection).  Undefining this macro results in the Ethernet/Wi-Fi 
	// RAM being used (minimum PIC RAM usage, lower performance).  Defining 
	// this macro results in PIC RAM getting used (higher performance, but uses 
	// PIC RAM).  This option should not be enabled on PIC18 devices.  The 
	// performance increase of having this option defined is only apparent when 
	// the HTTP server is servicing multiple connections simultaneously.
	//#define HTTP_SAVE_CONTEXT_IN_PIC_RAM

	// Indicate what file to serve when no specific one is requested
	#define HTTP_DEFAULT_FILE		"index.htm"
	#define HTTPS_DEFAULT_FILE		"index.htm"
	#define HTTP_DEFAULT_LEN		(10u)		// For buffer overrun protection.
												// Set to longest length of above two strings.

	// Configure MPFS over HTTP updating
	// Comment this line to disable updating via HTTP
	#define HTTP_MPFS_UPLOAD		"mpfsupload"
	//#define HTTP_MPFS_UPLOAD_REQUIRES_AUTH	// Require password for MPFS uploads
		// Certain firewall and router combinations cause the MPFS2 Utility to fail
		// when uploading.  If this happens, comment out this definition.

	// Define which HTTP modules to use
	// If not using a specific module, comment it to save resources
	#define HTTP_USE_POST					// Enable POST support
	#define HTTP_USE_COOKIES				// Enable cookie support
	#define HTTP_USE_AUTHENTICATION			// Enable basic authentication support

	//#define HTTP_NO_AUTH_WITHOUT_SSL		// Uncomment to require SSL before requesting a password

    // Define the listening port for the HTTP server
  	#define HTTP_PORT               (80u)

    // Define the listening port for the HTTPS server (if STACK_USE_SSL_SERVER is enabled)
	#define HTTPS_PORT				(443u)

    // Define the maximum data length for reading cookie and GET/POST arguments (bytes)
	#define HTTP_MAX_DATA_LEN		(100u)

    // Define the minimum number of bytes free in the TX FIFO before executing callbacks
	#define HTTP_MIN_CALLBACK_FREE	(16u)

	#define STACK_USE_HTTP_APP_RECONFIG		// Use the AppConfig web page in the Demo App (~2.5kb ROM, ~0b RAM)
	#define STACK_USE_HTTP_MD5_DEMO			// Use the MD5 Demo web page (~5kb ROM, ~160b RAM)
	#define STACK_USE_HTTP_EMAIL_DEMO		// Use the e-mail demo web page

// -- SSL Options --------------------------------------------------------

	#define MAX_SSL_CONNECTIONS		(2ul)	// Maximum connections via SSL
	#define MAX_SSL_SESSIONS		(2ul)	// Max # of cached SSL sessions
	#define MAX_SSL_BUFFERS			(4ul)	// Max # of SSL buffers (2 per socket)
	#define MAX_SSL_HASHES			(5ul)	// Max # of SSL hashes  (2 per, plus 1 to avoid deadlock)

	// Bits in SSL RSA key.  This parameter is used for SSL sever
	// connections only.  The only valid value is 512 bits (768 and 1024
	// bits do not work at this time).  Note, however, that SSL client
	// operations do currently work up to 1024 bit RSA key length.
	#define SSL_RSA_KEY_SIZE		(512ul)

// -- Telnet Options -----------------------------------------------------

	// Number of simultaneously allowed Telnet sessions.  Note that you
	// must have an equal number of TCP_PURPOSE_TELNET type TCP sockets
	// declared in the TCPSocketInitializer[] array above for multiple
	// connections to work.  If fewer sockets are available than this
	// definition, then the the lesser of the two quantities will be the
	// actual limit.
	#define MAX_TELNET_CONNECTIONS	(1u)

	// Default local listening port for the Telnet server.  Port 23 is the
	// protocol default.
	#define TELNET_PORT				23

	// Default local listening port for the Telnet server when SSL secured.
	// Port 992 is the telnets protocol default.
	#define TELNETS_PORT			992

	// Force all connecting clients to be SSL secured and connected via
	// TELNETS_PORT.  Connections on port TELNET_PORT will be ignored.  If
	// STACK_USE_SSL_SERVER is undefined, this entire setting is ignored
	// (server will accept unsecured connections on TELNET_PORT and won't even
	// listen on TELNETS_PORT).
	//#define TELNET_REJECT_UNSECURED

	// Default username and password required to login to the Telnet server.
	#define TELNET_USERNAME			"admin"
	#define TELNET_PASSWORD			"microchip"

// -- SNMP Options -------------------------------------------------------

	// Comment following line if SNMP TRAP support is needed
	//#define SNMP_TRAP_DISABLED

	//#define SNMP_STACK_USE_V2_TRAP
	#if defined(STACK_USE_SNMPV3_SERVER)
		#define SNMP_V1_V2_TRAP_WITH_SNMPV3
	#endif

	// This is the maximum length for community string.
	// Application must ensure that this length is observed.
	// SNMP module adds one byte extra after SNMP_COMMUNITY_MAX_LEN
	// for adding '\0' NULL character.
	#define SNMP_COMMUNITY_MAX_LEN  	(8u)
	#define SNMP_MAX_COMMUNITY_SUPPORT	(3u)
	#define NOTIFY_COMMUNITY_LEN		(SNMP_COMMUNITY_MAX_LEN)

	// Default SNMPv2C community names.  These can be overridden at run time if
	// alternate strings are present in external EEPROM or Flash (actual
	// strings are stored in AppConfig.readCommunity[] and
	// AppConfig.writeCommunity[] arrays).  These strings are case sensitive.
	// An empty string means disabled (not matchable).
	// For application security, these default community names should not be
	// used, but should all be disabled to force the end user to select unique
	// community names.  These defaults are provided only to make it easier to
	// start development.  Specifying more strings than
	// SNMP_MAX_COMMUNITY_SUPPORT will result in the later strings being
	// ignored (but still wasting program memory).  Specifying fewer strings is
	// legal, as long as at least one is present.  A string larger than
	// SNMP_COMMUNITY_MAX_LEN bytes will be ignored.
	#define SNMP_READ_COMMUNITIES		{"public", "read", ""}
	#define END_OF_SNMP_READ_COMMUNITIES
	#define SNMP_WRITE_COMMUNITIES     	{"private", "write", "public"}
	#define END_OF_SNMP_WRITE_COMMUNITIES
#endif

Debug Project

เมื่อเสร็จเรียบแล้ว ให้ตรวจสอบการเสียบสาย LAN ที่บอร์ดเข้ากับ Hub และ คอมพิวเตอร์ต่อสาย LAN เข้ากับ Hub แล้ว ทดลองรัน Project ด้วยคลิกที่ปุ่ม Debug Main Project

Microchip TCP Stack

Microchip TCP Stack

ทดสอบอุปกรณ์ว่าสามารถทำงานได้หรือไม่ ใช้คำสั่งที่คุ้นเคยกันคือ ping เพื่อ ping ไปยังบอร์ดทดลอง

ping 192.168.1.10

Microchip TCP Stack

Microchip TCP Stack

ปรับปรุงครั้งสุดท้ายวันที่ 17/11/2556

Leave a Reply

Your email address will not be published. Required fields are marked *


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>