Microchip TCP/IP Stack v3.75.6

Contents
Download zip file (1143KB)



Testing the TCP/IP Stack

After building the code and programming the microcontroller, you may have to perform a Power-On-Reset (power cycle) if you changed the microcontroller's configuration bits since the microcontroller only loads them after a Power-On-Reset and not after a normal Reset.

If everything is correct the LED connected to the pin mapped to LED0_IO will start blinking about once a second, and if you have a LCD module, it will show a series of message screens that will include an initial screen with the software version number, and then after a small delay the current time (if you compiled the time and SNTP modules using the USE_TIME and STACK_USE_SNTP options in the config.h file) and the values for the IP Transmit and Receive packet counters.

For designs or boards with a two line LCD module, the LCD will cycle between two screens showing for about 5 seconds the current time (or version number if time support has not been included) and then for about 10 seconds the IP packet counters.

If you included the time and SNTP module, until the unit is able to communicate with the NTP server to obtain the reference clock you will see the legend "--/--/-- --:--" on the display indicating that the current clock is not valid, and as soon the unit successfully receives a time update from the NTP server the display will start showing the current date and time.

Figures 1 and 2 below shows an example of the different messages you will see on the LCD for both two and four lines LCD modules.


Figure 1

Figure 2
[Click on the images for a larger view]

Also if you have connected serial interface and a terminal program (the stack default configuration for the serial interface is 19,200 bps, 8 bits, 1 stop bit, no parity) you will see the current IP address on the terminal screen.


Sending ICMP echo requests (ping)

The most popular program today available in almost any operating system to test if you can reach a remote IP host is ping, which sends an ICMP message packet to a remote host requesting an "echo reply".

The stack (unless it was disabled in the configuration file) includes a basic ICMP module that will reply to an "echo request".

Be aware that the current version only supports ICMP requests with a payload no larger than 32 bytes, then in some operating systems (Windows default is 32 bytes) you will need to specify the packet size.

Figure 3 below shows the command screen after running a ping to a PICNet 1 board running the TCP/IP Stack.


Figure 3
[Click on the image for a larger view]





   
    ©2006-2008, Jorge Amodio, All rights reserved

Last Update: July 15, 2007