In order to provide a small and resource saving network communication module for embedded system , after the trans-plantation of uC/OS-II, this paper introduces an embedded network communication module based on ENC 28J60 and uIP stack, detailedly describes the register configuration methods , provides the chip initialization code , implements the driver of ENC 28 J60 and shows how to use uIP stack .Besides, a method is also proposed and implemented to fix the bug of uIP in UDP communica-tion.The test results show that a TCP connection can be established between PC and evaluation board , UDP communication can also be carried on .%为了给嵌入式系统提供一个节省资源且体积微小的网络通信模块,在移植了uC/OS-II实时操作系统的基础上,设计并实现基于嵌入式以太网控制器ENC28J60和uIP协议栈的嵌入式TCP/IP协议通信模块,详述ENC28J60寄存器配置方法,提供芯片初始化代码,实现ENC28J60驱动程序并给出uIP协议的使用方法。另外,针对uIP在UDP通信过程中存在的问题提出一种解决思路并予以实现。测试结果显示,PC机和开发板之间能够建立TCP连接,可以进行UDP通信。
展开▼