📄 abstract.txt
字号:
This tiny web server was taken from the 'Design & Elektronik'
extra issue 'Embedded Internet'. It can be downloaded from the
following web site: www.elektroniknet.de/extraheft.
This software was adapted to work with a Keil MCB2300 board and
the Keil RV ARM C-Compiler with as few modifications as possible.
Note that modifications are not optimal, because ARM is a 32-bit
machine while the original software was written for 16-bit cpu.
The web page shows the values of two analog inputs (AN0 and AN1).
This tiny webserver needs very little resources and therefore has
some restrictions:
- only one active TCP session at any one time
- no support for fragmented IP datagrams
- no buffer for TCP datagrams received in wrong order
- only one web page. No GIF/JPG graphics possible.
The IP address can be modified in the module tcpip.h to
fit into your existing LAN (see MYIP_x).
Please order the extra issue 'Embedded Internet' of the
'Design & Elektronik' magazine for a technical description.
It is only available in German language.
The easyWEB project is set up for one target:
MCB2300: Settings for Keil MCB2300 Board.
Program code is loaded into on-chip flash
***********************************************************************************************
网络通信程序,程序运行前请用一根交叉普通网线一端接电脑网口,另一端接开发板上的网口,在电脑上运行CMD命令,接着输入ping 192.192.192.21,如果网络通信功能正常的话,会在屏幕上连续四次显示Replay from 192.192.192.21:bytes=32 time<1ms TTL=64,后面还有其它正确通信信息,否则提示request timed out .或者提示Hardware error. Destination host unreachable.等其它出错信息,表明网络通信失败。
注意:开发板的IP地址192.192.192.11是根据电脑的IP配置进行设定的,笔者电脑上的IP地址是192.192.192.19,子网掩码是255.255.255.0,默认网关是192.192.192.103,如果你的电脑IP不是这样配置的,实验前必须在程序tcpip.h文件中重新配置,tcpip.h文件中从第三行开始就分别定义了开发板上的IP地址,子网掩码和默认网关,都可以修改,其中子网掩码和默认网关必须与电脑上的一致,IP地址与电脑上的相近但不可相等,如电脑上的IP地址是192.192.192.19,则开发板上的IP地址是192.192.192.x,其中x只要不为19,数值正确即可。
实验步骤:
1.不要先给开发板加电源,实验前应将将仿真器(ULINK2)的数据接口排线插在开发板的JTAG接口上,用一根普通网线一端接电脑网口,另一端接开发板上的网口。
2.将两根USB线分别插在电脑的两个USB接口上,插好后一根接开发板的电源及数据接口端,另一根接仿真器(ULINK2)的电源及数据接口端,插好后相应的电源指示灯会亮,否则请检查线路连接是否正确。
3.打开EasyWEB文件夹下的EasyWEB.Uv2工程文件,单击双箭头向下的全编译图标,完成程序的全编译并且生成可以下载烧写到ARM芯片的AXF文件,如果编译通不过或提示程序有错误,请修改程序错误,调试程序直到编译通过。
4.全编译通过后,单击标有load的双箭头向下的图标,完成AXF文件通过仿真器下载和烧写到ARM芯片中,下载完成后按S1键(即RESET复位键)就可以在开发板上运行程序了。
5.在KEIL界面下左端的Project Workspace窗口中,双击Source Files文件夹下的easywebmain.c程序文件,右端窗口中就会显示相应的程序内容,因为main函数就在其中,程序就是从main函数开始执行的,找到其中的main函数,可以查看程序的执行流程。
6.在KEIL状态栏的Debug下,选择Start/Stop Debug Session, 开始调试程序。
7.在IE浏览器下面地址框中输入http://192.192.192.11/可以访问到板上的网页服务显示
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -