EDN首页   博客首页

最新日志

发表于:2007-3-26 11:04:44
标签:USB  

0

MyUSBNote

1.This is a fundamental USB concept. There is exactly one master in a USB system: the host computer.
USB devices respond to host requests. USB devices cannot send information among
themselves,
as they could if USB were a peer-to-peer topology.

host is always the bus master!

 

2.The SE0 state is used to signal an end-of-packet (EOP). EOP will be signaled by driving D+ and D- to the SE0
state for two bit times followed by driving the lines to the J state for one bit time.

add later........

点击此处查看原文 >>

系统分类: 嵌入式   |    用户分类:    |    来源: 无分类

评论(0) | 阅读(650)
发表于:2007-3-21 23:50:30
标签:AVR  USB  电压表  VC60  

4

AVRUSB电压表

 

用VC6.0做的PC端程序。开启程序后,设置定时器,每隔1秒检查USB设备一次,检查USB设备是否连接。插入USB设备,程序检测到USB设备后,更改定时器,每隔100ms读取USB设备一次,也就是说显示刷新率为10Hz。 

AD参数: 10bit AD, 100sps,片上2.56V参考电压,最大测量值 25.6V 。 

打开PC程序:

插上USB设备后:

测量电压:

所谓的设备:

点击看大图

电路图:

点击看大图

完整资料包:

rar

 

 

点击此处查看原文 >>

系统分类: 单片机   |    用户分类:    |    来源: 原创

评论(3) | 阅读(1270)
发表于:2007-3-21 9:30:49
标签:VC  前端显示  

1

VC中将程序前端显示的方法

调用函数:

BOOL SetWindowPos(
  HWND
hWnd,             // handle to window
  HWND hWndInsertAfter// placement-order handle

  int X,                 // horizontal position
  int Y,                 // vertical position
  int cx,                // width
  int cy,                // height
  UINT uFlags            // window-positioning flags
);

例如:


void CSwitcherDlg::OnCheck1()
{
    // TODO: Add your control notification handler code here
    UpdateData(true);


    if (m_check_1)
   {

        ::SetWindowPos(this->m_hWnd,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);  // top view
    }
    else
   {

       ::SetWindowPos(this->m_hWnd,HWND_NOTOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);  // normal view

   }

}

 

 

点击此处查看原文 >>

系统分类: 软件开发   |    用户分类:    |    来源: 原创

评论(0) | 阅读(966)
发表于:2007-3-19 14:37:01
标签:LED数码管界面  VC程序  

1

LED数码管界面的演示-VC程序

这是来自http://www.codeproject.com/staticctrl/digistring.asp 的一个有趣的例子。

点击看大图

 

How to use (in a dialog):

  1. Add digistatic.h, digistatic.cpp, memdc.h, curvefit.h, curvefit.cpp and rgbcolor.h to your project environment.
  2. Add a static control to your dialog resource.
  3. Change its ID to something like IDC_LEDTEXT, open class-wizard and assign a member variable, type control (CStatic) to it (m_LedText for example).
  4. Open your dialog class's header file. Add #include "digistatic.h". Find the line CStatic m_LedText and replace the CStatic by CDigiStatic.
  5. In OnInitDialog() you can give it some text with SetText(), change the colors with SetColor() or for the background SetBkColor(). Or, you can set the right style with ModifyDigistyle().
  6. Compile and run.

程序包:zip

点击此处查看原文 >>

系统分类: 软件开发   |    用户分类:    |    来源: 整理

评论(0) | 阅读(938)
发表于:2007-3-7 10:12:55
标签:无标签

1

一些好的VC++资源

1. http://www.codeproject.com/

2.http://www.codeguru.com/

 

# VC++ 技巧:

 Alt + F8  :重新编排;

 

点击此处查看原文 >>

系统分类: 软件开发   |    用户分类:    |    来源: 整理

评论(0) | 阅读(584)
发表于:2007-1-3 1:02:06
标签:LCD  AVR  ATmega16  

4

128X96点阵LCD驱动及演示程序

点击看大图点击看大图

 

基于三星S6B0741芯片的LCD,LCD型号为LM9033A。单3.3V电压,有并行和串行通讯模式,串行通讯只需5个IO,所以使用起是来很方便。本例用ATmega16驱动,串行连接,WINAVR C语言编程。在此贴出程序,希望能给大家一些帮助。

程序:rar

 

点击此处查看原文 >>

系统分类: 单片机   |    用户分类:    |    来源: 原创

评论(7) | 阅读(1937)
发表于:2006-12-31 22:18:20
标签:无标签

0

今天开通,赶在2007前。

今天开通,赶在2007 前。

 

还有两小时就2007,祝所有人新年快乐。

点击此处查看原文 >>

系统分类: 生活点滴   |    用户分类: 无分类    |    来源: 原创

评论(0) | 阅读(553)
总共 , 当前 /