加入收藏夹
域名:www.kincony.com    www.hificat.com       English Version || 公司简介|| 汇款须知 || 汇款确认及留言 || 论坛 || 淘宝网店


PIC以太网开发板——基于微芯最新ENC28J60以太网控制器

Microchip TCP/IP Stack v3.75.6 协议栈说明介绍

 

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

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 below shows the command screen after running a ping to a PICNet 1 board running the TCP/IP Stack.

--->>>返回首页

以上部分内容转载于网上,如有涉及到版权问题,请即通知本人删除 ICP备05019516号
联系地址:浙江省杭州市拱墅区普金家园11-3-702 徐玮 邮政编码:310015 Email:hificat@163.com xu169@sina.com
电话:0571-85956028 传真:0571-88230070 手机:13185018567 QQ:420951892 MSN:hificat@hotmail.com
杭州晶控电子有限公司 版权所有 COPYRIGHT2003——2007 HANGZHOU KinCony ELECTRONICS CO.,LTD All rights reserved