8854|19

1万

帖子

16

TA的资源

版主

楼主
 

流明学习笔记之十二用UIP点亮LED [复制链接]

这几天我一直没在流明方面冒泡哈,原因很多,工作忙,晚上有人找修电脑地,还有人找干活地,一直没倒出功夫来哈,就算倒出功夫来也是一头雾水,为什么UIP条目不少啊,你看看一行两行,差不多上千行了,但我这几天学习过来学习过去发现一个可以实现的方法,于是我就在例程基础上改了一下,大家一起学习哈!!!

 

       书归正转!

  

       自从上次实现了远程控制,我就想自己做个网页控制自己的东东,嘿嘿!!!

 

       可是,这就得用到一个软件DREAMWEAVER 3.0

 

       为什么要用3.0,我觉得好用,方便,实在

 

       本想直接用HTML那种格式如:

  //*****************************************************************************
//
// Default Web Page - allocated in three segments to allow easy update of a
// counter that is incremented each time the page is sent.
//
//*****************************************************************************
static const char page_not_found[] =
"HTTP/1.0 404 OK\r\n"
"Server: TCP/IP (http://www.NUAA.COM/TCP/IP/)\r\n"
"Content-type: text/html\r\n\r\n"
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.NUAA.COM\">"
"<html>"
  "<head>"
    "<title>;Page Not Found!</title>"
  "</head>"
  "<body>"
    "Page Not Found!"
  "</body>"
"</html>";

 

这是UIP例程中的那种

 

但作了些实验觉得不好,为什么呢,我设计的按钮是那种地,它就给我显示一个方格子,娘地,为这事我搞了好几天

 

最后决定用数组那种,这又引出了个软件WINHEX,我呆会把它打包上传,我也做个记号,大家也方便哈。

 

我先用 DREAMWEAVER

 

做了个网页

 

 

然后用WINHEX取数,然后把取来的数据变成数组,考到

 

//*****************************************************************************
//
// Default Web Page - allocated in three segments to allow easy update of a
// counter that is incremented each time the page is sent.
//
//*****************************************************************************
static const char default_page_buf1of3[] = {
0x3C,0x68,0x74,0x6D,0x6C,0x3E,0x0D,0x0A,0x3C,0x68,
0x65,0x61,0x64,0x3E,0x0D,0x0A,0x3C,0x74,0x69,0x74,
0x6C,0x65,0x3E,0xCE,0xDE,0xB1,0xEA,0xCC,0xE2,0xCE,
0xC4,0xB5,0xB5,0x3C,0x2F,0x74,0x69,0x74,0x6C,0x65,
0x3E,0x0D,0x0A,0x3C,0x6D,0x65,0x74,0x61,0x20,0x68,
0x74,0x74,0x70,0x2D,0x65,0x71,0x75,0x69,0x76,0x3D,
0x22,0x43,0x6F,0x6E,0x74,0x65,0x6E,0x74,0x2D,0x54,
0x79,0x70,0x65,0x22,0x20,0x63,0x6F,0x6E,0x74,0x65,
0x6E,0x74,0x3D,0x22,0x74,0x65,0x78,0x74,0x2F,0x68,
0x74,0x6D,0x6C,0x3B,0x20,0x63,0x68,0x61,0x72,0x73,
0x65,0x74,0x3D,0x67,0x62,0x32,0x33,0x31,0x32,0x22,
0x3E,0x0D,0x0A,0x3C,0x2F,0x68,0x65,0x61,0x64,0x3E,
0x0D,0x0A,0x0D,0x0A,0x3C,0x62,0x6F,0x64,0x79,0x20,
0x62,0x67,0x63,0x6F,0x6C,0x6F,0x72,0x3D,0x22,0x23,
0x46,0x46,0x46,0x46,0x46,0x46,0x22,0x3E,0x0D,0x0A,
0x3C,0x66,0x6F,0x72,0x6D,0x20,0x6D,0x65,0x74,0x68,
0x6F,0x64,0x3D,0x22,0x70,0x6F,0x73,0x74,0x22,0x20,
0x61,0x63,0x74,0x69,0x6F,0x6E,0x3D,0x22,0x22,0x3E,
0x0D,0x0A,0x20,0x20,0x3C,0x70,0x3E,0x3C,0x66,0x6F,
0x6E,0x74,0x20,0x73,0x69,0x7A,0x65,0x3D,0x22,0x35,
0x22,0x20,0x63,0x6F,0x6C,0x6F,0x72,0x3D,0x22,0x23,
0x30,0x30,0x30,0x30,0x46,0x46,0x22,0x3E,0x4C,0x45,
0x44,0xB7,0xB4,0xD7,0xAA,0xD1,0xDD,0xCA,0xBE,0x3C,
0x2F,0x66,0x6F,0x6E,0x74,0x3E,0x3C,0x2F,0x70,0x3E,
0x0D,0x0A,0x20,0x20,0x3C,0x70,0x3E,0x0D,0x0A,0x20,
0x20,0x20,0x20,0x3C,0x69,0x6E,0x70,0x75,0x74,0x20,
0x74,0x79,0x70,0x65,0x3D,0x22,0x73,0x75,0x62,0x6D,
0x69,0x74,0x22,0x20,0x6E,0x61,0x6D,0x65,0x3D,0x22,
0x53,0x75,0x62,0x6D,0x69,0x74,0x22,0x20,0x76,0x61,
0x6C,0x75,0x65,0x3D,0x22,0xB7,0xA2,0xCB,0xCD,0x22,
0x3E,0x0D,0x0A,0x20,0x20,0x3C,0x2F,0x70,0x3E,0x0D,
0x0A,0x3C,0x2F,0x66,0x6F,0x72,0x6D,0x3E,0x0D,0x0A,
0x3C,0x70,0x3E,0x26,0x6E,0x62,0x73,0x70,0x3B,0x3C,
0x2F,0x70,0x3E,0x0D,0x0A,0x3C,0x70,0x20,0x61,0x6C,
0x69,0x67,0x6E,0x3D,0x22,0x63,0x65,0x6E,0x74,0x65,
0x72,0x22,0x3E,0x55,0x49,0x50,0xD4,0xB6,0xB3,0xCC,
0xBF,0xD8,0xD6,0xC6,0xCD,0xF8,0xD2,0xB3,0x3C,0x2F,
0x70,0x3E,0x0D,0x0A,0x3C,0x70,0x3E,0x26,0x6E,0x62,
0x73,0x70,0x3B,0x3C,0x2F,0x70,0x3E,0x0D,0x0A,0x3C,
0x70,0x20,0x61,0x6C,0x69,0x67,0x6E,0x3D,0x22,0x63,
0x65,0x6E,0x74,0x65,0x72,0x22,0x3E,0x20,0x3C,0x66,
0x6F,0x6E,0x74,0x20,0x63,0x6F,0x6C,0x6F,0x72,0x3D,
0x22,0x23,0x30,0x30,0x43,0x43,0x46,0x46,0x22,0x3E,
0x3C,0x61,0x20,0x68,0x72,0x65,0x66,0x3D,0x22,0x68,
0x74,0x74,0x70,0x3A,0x2F,0x2F,0x73,0x74,0x6F,0x72,
0x65,0x2E,0x74,0x61,0x6F,0x62,0x61,0x6F,0x2E,0x63,
0x6F,0x6D,0x2F,0x73,0x68,0x6F,0x70,0x2F,0x76,0x69,
0x65,0x77,0x5F,0x73,0x68,0x6F,0x70,0x2E,0x68,0x74,
0x6D,0x3F,0x61,0x73,0x6B,0x65,0x72,0x3D,0x77,0x61,
0x6E,0x67,0x77,0x61,0x6E,0x67,0x26,0x61,0x6D,0x70,
0x3B,0x73,0x68,0x6F,0x70,0x5F,0x6E,0x69,0x63,0x6B,
0x3D,0x64,0x64,0x6C,0x6C,0x78,0x78,0x72,0x72,0x22,
0x3E,0xD6,0xC7,0xC1,0xD6,0xCC,0xD4,0xB1,0xA6,0xC8,
0xFD,0xB5,0xEA,0xC9,0xE8,0xBC,0xC6,0x3C,0x2F,0x61,
0x3E,0x3C,0x2F,0x66,0x6F,0x6E,0x74,0x3E,0x3C,0x2F,
0x70,0x3E,0x0D,0x0A,0x3C,0x70,0x20,0x61,0x6C,0x69,
0x67,0x6E,0x3D,0x22,0x63,0x65,0x6E,0x74,0x65,0x72,
0x22,0x3E,0xB1,0xBE,0xB5,0xEA,0xD3,0xD0,0xD0,0xED,
0xB6,0xE0,0xC4,0xA3,0xBF,0xE9,0xBF,0xC9,0xD6,0xB1,
0xBD,0xD3,0xBF,0xAA,0xB7,0xA2,0xB6,0xAB,0xB6,0xAB,
0xA3,0xA1,0xBB,0xB6,0xD3,0xAD,0xB9,0xE2,0xC1,0xD9,
0xA3,0xA1,0x3C,0x2F,0x70,0x3E,0x0D,0x0A,0x3C,0x70,
0x3E,0x26,0x6E,0x62,0x73,0x70,0x3B,0x3C,0x2F,0x70,
0x3E,0x0D,0x0A,0x3C,0x70,0x3E,0x26,0x6E,0x62,0x73,
0x70,0x3B,0x20,0x3C,0x2F,0x70,0x3E,0x0D,0x0A,0x3C,
0x2F,0x62,0x6F,0x64,0x79,0x3E,0x0D,0x0A,0x3C,0x2F,
0x68,0x74,0x6D,0x6C,0x3E,0x0D,0x0A};

 

然后再修改下程序,让程序判断有无POS这三个字母

 

 //
                    // If it isn't a GET, we abort the connection.
                    //
                    //uip_abort();
              ppp=&BUF_APPDATA[0];
     for(i=0;i<100;i++)
     {
      if((*(ppp+i)==0x50)&&(*(ppp+i+1)==0x4F)&&(*(ppp+i+2)==0x53))
       {
                if(timestimes==0)
        {
            timestimes=1;
         LEDON();
        }
        else
        {
            timestimes=0;
         LEDOFF();
        }
        i=0;

              goto jump;
       }
       //else
      // break;
     }

 

                    return;
                }

 

 

最后的效果是,每当我按下发送键一下

灯就反转一次,亮变灭灭变亮!!!

 

 

 

就这样我实现了我的预定目标,但这个代价也大近半个月哈,现在拿出分享,请大家不要忘记挖井人哈

 

好了,我现传东东哈

 

首先:例程:下到板子,在IE键入192.168.1.12就行

 

lm3s8962 uip.zip (2.37 MB, 下载次数: 353)

 

WINHEX

 

WinHex-v15.1sr-8H.rar (1.17 MB, 下载次数: 219)

 

 

 

 

 

[ 本帖最后由 ddllxxrr 于 2010-12-10 21:49 编辑 ]

最新回复

最近在做毕设,要用uip去访问网页。比如说新浪,百度的就行了。不知道你有什么看法。指导下。谢了。  详情 回复 发表于 2014-4-4 00:24
 
点赞 关注(1)
个人签名http://shop34182318.taobao.com/
https://shop436095304.taobao.com/?spm=a230r.7195193.1997079397.37.69fe60dfT705yr

回复
举报

1万

帖子

16

TA的资源

版主

沙发
 

上图哈,什么有图就有真象来这

 

PLAM600拍的,

 

这是没按发送时

这是按发送时

 

 

;P 

[ 本帖最后由 ddllxxrr 于 2010-12-11 08:58 编辑 ]
 
个人签名http://shop34182318.taobao.com/
https://shop436095304.taobao.com/?spm=a230r.7195193.1997079397.37.69fe60dfT705yr
 

回复

19

帖子

0

TA的资源

一粒金砂(中级)

板凳
 

nuaa?

很好奇啊 难不成楼主是nuaa的?
 
 
 

回复

1万

帖子

16

TA的资源

版主

4
 

不是,我是举个例子

 
个人签名http://shop34182318.taobao.com/
https://shop436095304.taobao.com/?spm=a230r.7195193.1997079397.37.69fe60dfT705yr
 
 

回复

545

帖子

0

TA的资源

一粒金砂(高级)

5
 

很不错,支持

 
 
 

回复

1万

帖子

16

TA的资源

版主

6
 
 
个人签名http://shop34182318.taobao.com/
https://shop436095304.taobao.com/?spm=a230r.7195193.1997079397.37.69fe60dfT705yr
 
 

回复

5

帖子

0

TA的资源

一粒金砂(初级)

7
 
请问怎么用WINHEX取数呢?
 
 
 

回复

81

帖子

0

TA的资源

一粒金砂(中级)

8
 
高手啊!学习!
 
 
 

回复

144

帖子

0

TA的资源

一粒金砂(中级)

9
 
LZ,网页文件上传一下?
 
 
 

回复

29

帖子

0

TA的资源

一粒金砂(中级)

10
 

支持

支持
 
 
 

回复

17

帖子

0

TA的资源

一粒金砂(中级)

11
 
实际上用RL_TCPNET带的web 服务器做这个很简单的,转换网页也没那么麻烦。
 
 
 

回复

76

帖子

0

TA的资源

一粒金砂(中级)

12
 

学习ing

高人啊!学习!
 
 
 

回复

245

帖子

0

TA的资源

纯净的硅(初级)

13
 
楼主把网页的代码也分享一下咯!
原帖由 ddllxxrr 于 2010-12-11 08:54 发表   PLAM600拍的,   这是没按发送时 57672 这是按发送时 57673     ;P 
 
 
 

回复

22

帖子

0

TA的资源

一粒金砂(中级)

14
 

回复 楼主 ddllxxrr 的帖子

楼主能解释一下 自带的那个eth-io 程序吗,看了一个星期,云里雾里的
 
 
 

回复

22

帖子

0

TA的资源

一粒金砂(中级)

15
 

回复 楼主 ddllxxrr 的帖子

为什么判断有无POS 就可以,希望楼主赐教
 
 
 

回复

22

帖子

0

TA的资源

一粒金砂(中级)

16
 

回复 楼主 ddllxxrr 的帖子

为什么判断有无POS 就可以,希望楼主赐教
 
 
 

回复

1万

帖子

16

TA的资源

版主

17
 

这个是来息网上的信息,由于本例简单固判断POS

也可以任意发挥
 
个人签名http://shop34182318.taobao.com/
https://shop436095304.taobao.com/?spm=a230r.7195193.1997079397.37.69fe60dfT705yr
 
 

回复

55

帖子

0

TA的资源

一粒金砂(中级)

18
 
高手高手
 
 
 

回复

349

帖子

0

TA的资源

一粒金砂(中级)

19
 
支持

支持
 
 
 

回复

5

帖子

0

TA的资源

一粒金砂(初级)

20
 
最近在做毕设,要用uip去访问网页。比如说新浪,百度的就行了。不知道你有什么看法。指导下。谢了。
 
 
 

回复
您需要登录后才可以回帖 登录 | 注册

随便看看
查找数据手册?

EEWorld Datasheet 技术支持

相关文章 更多>>
关闭
站长推荐上一条 1/7 下一条

 
EEWorld订阅号

 
EEWorld服务号

 
汽车开发圈

About Us 关于我们 客户服务 联系方式 器件索引 网站地图 最新更新 手机版

站点相关: 国产芯 安防电子 汽车电子 手机便携 工业控制 家用电子 医疗电子 测试测量 网络通信 物联网

北京市海淀区中关村大街18号B座15层1530室 电话:(010)82350740 邮编:100190

电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号 Copyright © 2005-2025 EEWORLD.com.cn, Inc. All rights reserved
快速回复 返回顶部 返回列表