技术资料转载备份
豹子辰
这个作者很懒,什么都没留下…
展开
-
C# DateTime 格式
dateTime dt = DateTime.Now; Label1.Text = dt.ToString();//2005-11-5 13:21:25 Label2.Text = dt.ToFileTime().ToString();//1277564168转载 2011-09-04 13:40:52 · 383 阅读 · 0 评论 -
在C#中使用SerialPort类实现串口通信
在.NET Framework 2.0中提供了SerialPort类,该类主要实现串口数据通信等。本文章将本人在学习过程中从网络上搜集到的相关信息写出来供大家参考。下面主要介绍该类的主要属性(表1)和方法(表.2)。如果需要了解更多的信息请登录http://msdn.microsoft.com/zh-cn/library/system.io.ports.serialport(VS.80).转载 2012-05-18 15:53:59 · 1475 阅读 · 0 评论 -
stm8 红外解码 使用TL IO中断与定时实现(芯片用103)
void EXTI_init(void){ EXTI_CR1_PCIS = 2; // PC口下降沿触发中断}void TIM1_init(void){ CLK_PCKENR1|=0x80; //开启定时器1外设时钟 TIM1_PSCRH = 0; // 8M系统时钟经预分频f=fck/(PSCR+1)转载 2012-04-04 10:20:08 · 5390 阅读 · 3 评论 -
飞思卡尔烟雾传感器main.c
#include /* common defines and macros */#include /* derivative information */#pragma LINK_INFO DERIVATIVE "mc9s12xs128"#include "stdio.h" #include "math.h"#include "LQ12864.h"#define转载 2012-03-30 16:20:28 · 2107 阅读 · 1 评论 -
STM8中断向量表
// Copyright (c) 2009, Wolver Wang, Innov Inc. R&D Center// [email protected]// All rights reserved.//// Redistribution and use in source and binary forms, with or without// modification, are perm转载 2012-03-29 19:28:45 · 18267 阅读 · 6 评论 -
pcf8563 C语言编程
#include #include sbit SDA=P1^0; // 将p1.0口模拟数据口sbit SCL=P1^1; // 将p1.1口模拟时钟口#define MIN 0x02 //秒寄存器#define SEC 0x03 //分寄存器#define HOUR 0转载 2012-03-27 12:01:35 · 13570 阅读 · 3 评论 -
IAR FOR STM8精确延时函数
【整理者】61ic.com【提供者】llz77【详细说明】IAR FOR STM8精确延时函数 用的是IAR FOR STM8,有个项目想精确的知道下delay行数的延时时间是多少,上网搜了下竟然没有,而且发现好些人提问怎么又这样的函数,我就用示波器测量做了个精确延时函数,分享给各位朋友吧。(16M晶振)用的时钟启动函数是void ClkInit(void) { C转载 2012-03-29 20:43:37 · 28697 阅读 · 4 评论 -
C#中dataGridView用法集
SqlConnection conn = new SqlConnection('Server=(local);DataBase=test;User=sa;Pwd=sa');SqlDataAdapter da = new SqlDataAdapter('select * from test', conn);DataSet ds = new DataSet();da.Fill(ds);转载 2012-02-10 16:39:41 · 1122 阅读 · 0 评论 -
获取Form.ShowDialog() 出的窗体中textbox的返回值
经常会遇到ShowDialog出的窗体中有一些textbox,输入完后返回到主窗体中。怎么办呢?有办法。理论上讲ShowDialog后的窗体返回值类型是DialogResult。也就是一个枚举值,只有yes,no,ok之类的值,肯定是不能把textbox中的值返回的。有人说重写DialogResult。可以,但是估计没几个人会的。举个简单的例子就可以实现。两个窗体from1转载 2012-02-01 16:42:51 · 1157 阅读 · 0 评论 -
c# form 传参数
方法一:传值最先想到的,Form2构造函数中接收一个string类型参数,即Form1中选中行的文本,将Form2的TextBox控件的Text设置为该string,即完成了Form1向Form2的传值。当Form2的AcceptChange按钮按下,需要修改Form1中ListBox中相应列的值,因此可以考虑同时将Form1中的ListBox控件当参数也传入Form2,所有修改工作都在For转载 2012-02-01 16:22:18 · 1751 阅读 · 0 评论 -
C# String.Format格式说明
C#格式化数值结果表字符说明示例输出C货币string.Format("{0:C3}", 2)$2.000D十进制string.Format("{0:D3}", 2)0转载 2011-09-04 16:29:58 · 354 阅读 · 0 评论 -
C# USB通讯
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.IO;namespace U盘更新{转载 2012-05-18 16:01:45 · 9026 阅读 · 2 评论