2010年5月14日

Verilog SPI interface IP

摘要: 参考http://www.fpga4fun.com/SPI2.htmlclk为FPGA的50M晶振需要用到SPI的四线制模式,SSEL信号必须要有。8位数据模式,polarity=0,phase=1。发送数据:把要发送的数据给到byte_data_tosent上,byte_sent_request给出一个上升沿,从而byte_sent_int也给DSP一个上升沿,触发DSP的SPI读。接收数据:当byte_received产生上升沿的时候,表明byte_data_received数据有效,可以读取。仿真波形:发送数据为0xF1,接收数据为0xFA下载地址:http://download.csd 阅读全文

posted @ 2010-05-14 14:17 yanhc 阅读(307) 评论(0) 推荐(0) 编辑

2010年3月26日

VC Access violation调试过程记录

摘要: 这几天在调一个摄像头的程序,把摄像头的图像数据读回来,然后用H263压缩(参考codeproject的VideoNet)。后来程序一直出现一个Access violation(AV)的错误,折腾了我整整2天,终于搞出来了。后来调试过程中发现是下面这句的问题//Convert the data from rgb format to YUV format ConvertRGB2YUV(IMAGE_WIDTH,IMAGE_HEIGHT,data,yuv); data为摄像头返回的RGB数据,yuv为转换成的yuv数据,开始一直在找yuv和输出数据的问题,没有发现什么原因,使用了各种调试工具,待会会. 阅读全文

posted @ 2010-03-26 09:15 yanhc 阅读(678) 评论(0) 推荐(0) 编辑

2010年3月25日

VC VFWcamera 和 VideoCapH263笔记

摘要: 内容参考:http://www.codeproject.com/KB/IP/videonet.aspxDisplaying the Captured Video FrameThere are various methods and APIs for displaying the captured frame. You can use SetDIBitsToDevice() method to directly display the frame. But this is quite slow as it is based on Graphics Device Interface (GDI) f 阅读全文

posted @ 2010-03-25 21:06 yanhc 阅读(801) 评论(0) 推荐(0) 编辑

2010年3月24日

神奇:微软Microsoft相关的网站打不开,其他的都可以

摘要: [分享] 打不开微软网站的解决办法神奇自己装了个window 2003系统,然后想了想,把所有补丁都打上了。不打补丁之前,可以访问微软的网站的。可是打了补丁之后,就发现凡是微软的网站,都打不开了……让我还误会以为是微软的补丁问题看了网上都是说什么网速啊,什么DNS错误……不靠谱嘛终于找到一文章说是中了 Conficker 病毒。这个病毒中毒后没别的反映,就是打不开微软……(竞争对手做的??)找了一个专杀工具……10分钟后……ok了专杀工具的下载地址:http://files.cnblogs.com/donghongtao/kk_v3.4.7.zip幸亏这位哥们:http://bbs.pcbet 阅读全文

posted @ 2010-03-24 20:27 yanhc 阅读(441) 评论(0) 推荐(0) 编辑

2010年3月23日

VC错误:编译程序中出现“fatal error C1010: unexpected end of file”

摘要: 编译程序中出现“fatal error C1010: unexpected end of file”编号:QA002308建立日期: 1999年12月24日 最后修改日期:2003年6月22日 所属类别: C/C++ - 错误信息Q qjwn: 操作系统:win98 编程工具:vc++ 问题:我在编译程序中老出现“fatal error C1010: unexpected end of file while looking for precompiled header directive”这一句,但我查看了程序并没有错,请问这是怎么一回事? A回答: 肯定是一个新添加的类的.cpp文件... 阅读全文

posted @ 2010-03-23 14:58 yanhc 阅读(504) 评论(0) 推荐(0) 编辑

2010年3月20日

Visual C++6.0字体设置

摘要: 我的tool->option里面没有Courier New这个字体,但电脑里安装了,设置如下要改成我喜欢的“Courier New”字体,google到的解决办法如下:修改注册表:HKEY_CURRENT_USER/Software/Microsoft/DevStudio/6.0/Format 下的FontFace的值为 Courier NewFontSize=10(10进制)或a(16进制)启动Visual C++就OK,但是必须保证你的电脑安装了Courier New字体。 阅读全文

posted @ 2010-03-20 09:26 yanhc 阅读(2724) 评论(0) 推荐(0) 编辑

2010年3月19日

Tiny Web Server Tiny Web服务器练习

摘要: 使用《深入理解计算机组成》书里面的Web编程里的代码,了解HTTP和HTML和CGI的原理**********************************************TELNET**********************************************vadmin@vadmin:~$ telnet localhost 1000Trying ::1...Trying 127.0.0.1...Connected to localhost.Escape character is '^]'.GET / HTTP/1.1HTTP/1.0 200 OKSe 阅读全文

posted @ 2010-03-19 15:58 yanhc 阅读(563) 评论(0) 推荐(0) 编辑

2010年3月18日

Linux GCC make文件的写法--总结版

摘要: 目录结构为:inc/hello.hsrc/hello.cmain/main.cMakefile文件内容为:hello.h:void hello(char name[]); hello.c:#include <stdio.h>void hello(char name[]){ printf("Hello %s!/n", name);} main.c:#include <stdio.h>#include "hello.h"// The second hello.h should in ""int main(){ he 阅读全文

posted @ 2010-03-18 10:22 yanhc 阅读(1041) 评论(0) 推荐(0) 编辑

2010年3月17日

Linux GCC make文件的写法4--清晰版

摘要: 包含3个文件夹,和一个文件Makefile目录组织结构如下:Makefileinc/hello.hmain/main.csrc/hello.cMakefile文件在外面,这样生成的.o和可执行文件都在外面,clean之后会很干净,结构清晰文件内容如下:Makefile(之所以用大写,因为make可以识别Makefile和makefile,用大写可以鲜明一些)::# String declarationobjects = main.o hello.o# Commandapp : $(objects) cc -o app $(objects)main.o : main/main.c hello.h 阅读全文

posted @ 2010-03-17 16:15 yanhc 阅读(250) 评论(0) 推荐(0) 编辑

Linux GCC make文件的写法3

摘要: 包含3个文件夹目录组织结构如下:inc/hello.hmain/main.c, Makefilesrc/hello.c文件内容如下:hello.h:void hello(char name[]); main.c:#include <stdio.h>#include "../inc/hello.h"// The second hello.h should in ""int main(){ hello("GCC"); printf("Haha Linux Ubuntu!/n"); return 0;} 其中 阅读全文

posted @ 2010-03-17 16:07 yanhc 阅读(202) 评论(0) 推荐(0) 编辑

导航