2009年12月28日星期一

dxp pcb线条默认宽度调整方法:

1. 点击pcb Interactively route connections 图标,出现线条时按下Tab, 出现对话框,里面调整.
2. 菜单Design -->rules -->routing width 里面调整width 大小.

DXP如何修改PCB丝印层全部字符大小?

99SE有对任意字符的操作有一个Global选项,可以把改变应用于全局,那么DXP呢?

DXP也有全局功能。
1. 在丝印层任意字符上点右键,选“find similar object”,在弹出窗口中想要匹配项目后面选“same”,点“ok”会出现inspect窗口,在里面选择 Text Heigh 改成所需高度,回车就行了。
2. 恢复pcb常见视图.
执行完第一步操作时, pcb视图变为丝印层选择字符状态,即字符高亮显示, pcb线条看不见. 现在恢复如下. 任意位置上点右键, build quiery--> apply-->ok, 任意位置点左键. 即可看到pcb线条

2009年9月7日星期一

a b c 从大到小排列

#include
sort_three_element(int * a ,int * b ,int * c )//// a b c 从大到小排列
{ int h=*a> *b && * a> *c? *a:( *b> *c? *b: *c) ;
int j=*a> *b && *a< *c|| *a< *b&& *a> *c? *a:( *a< *b&& *a< *c?( *b> *c? *c: *b):( *b> *c? *b: *c)) ;
int k=*a< *b && * a< *c? *a:( *b< *c? *b: *c);
*a=h ;*b=j;*c=k;
}
int main()
{
int a=30,b=2,c=91;
sort_three_element(&a,&b,&c);
printf ("最大=%d, 中间=%d, 最小=%d\n", a,b,c);
return 0;
}

2009年9月4日星期五

50Hz 有效值测量

确认抽样值是抽取的一个周期里的样本点. 即就是用matlab画出样本点数据.arm程序设定为64点抽样.在ads中查看抽样点数据,然后导入到matlab中绘图.
x1=1:64
% y1=[3296 3296 3296 3296 3296 3296 3296 3296 3296 3296 ...
% 3296 3296 3296 3296 3296 3296 3296 3296 3296 3296 ...
% 3296 3296 3296 3296 3296 3296 3296 3296 3296 3296 3296 ...
% 3296 3235 3000 2803 2623 2478 2352 2242 2149 2065 ...
% 1994 1930 1869 1824 1782 1743 1711 1675 1656 1633 ...
% 1611 1598 1579 1569 1556 1550 1537 1533 1524 1524 ...
% 1514 1527 1978]
% % subplot(3,1,1)
% plot(x1,y1)

y2=[1669 1640 1624 1604 1591 1575 1559 1550 1540 1530 ...
1524 1511 1511 1504 1591 2027 2362 2678 2935 3171 ...
3296 3296 3296 3296 3296 3296 3296 3296 3296 3296 3296 3296 ...
3296 3296 3296 3296 3296 3296 3296 3296 3296 ...
3296 3296 3296 3296 3296 3296 3296 3190 2951 ...
2758 2581 2442 2313 2213 2117 2043 1969 1969 ...
1846 1798 1765 1720 1691 ]
%subplot(3,1,2)
plot(x1,y2)

%
% y3=[3296 3296 3296 3296 3296 3296 3296 3296 3296 3296 ...
% 3296 3296 3296 3296 3296 3296 3296 3296 3296 3296 ...
% 3296 3296 3296 3296 3296 3296 3296 3296 3296 3296 3296 ...
% 3296 3235 3000 2803 2623 2478 2352 2242 2149 2065 ...
% 1994 1930 1869 1824 1782 1743 1711 1675 1656 1633 ...
% 1611 1598 1579 1569 1556 1550 1537 1533 1524 1524 ...
% 1514 1527 1978]
% subplot(3,1,3)
% plot(x1,y3)

2009年9月1日星期二

LM7805 LM2575 比较

7805转换效率比较低,只有40%左右,但是输出纹波很小,对于单片机这种对电源要求比较高的元件而言很适合,
而2575和2596开关型的稳压芯片,转换效率可以达到75%甚至80%以上,但是输出有纹波,很可能让单片机出现重启现象。

2009年7月27日星期一

vb 中文件系统, 目录的操作

FSO 对象模型编程包括三项主要任务:
FSO 对象模型包含在一个称为 Scripting 的类型库中,此类型库位于 Scrrun.Dll 文件中。如果还没有引用此文件,请从“属性”菜单的“引用”对话框选择“Microsoft Scripting Runtime”项。然后就可以使用“对象浏览器”来查看其对象、集合、属性、方法、事件以及它的常数。

使用CreateObject 方法,或将一个变量声明为 FileSystemObject 对象类型来创建一个 FileSystemObject 对象。


例如: 下面代码创建目录,删除目录

Private Sub Form_Load()

'获得 FileSystemObject 的实例。
Dim fso As New FileSystemObject
Dim fldr As Folder, s As String
'获取 Drive 对象。
Set fldr = fso.GetFolder("c:")
' 显示父文件夹名。
Debug.Print "Parent folder name is: " & fldr
' 显示驱动器名。
Debug.Print "Contained on drive " & fldr.Drive
' 显示根文件名。
If fldr.IsRootFolder = True Then
Debug.Print "This folder is a root folder."
Else
Debug.Print "This folder isn't a root folder."
End If
' 用 FileSystemObject 对象创建一个新的文件夹。
fso.CreateFolder ("c:\Bogus")
Debug.Print "Created folder C:\Bogus"
' 显示文件夹的基本名称。
Debug.Print "Basename = " & fso.GetBaseName("c:\bogus")
' 删除新建的文件夹。
fso.DeleteFolder ("c:\Bogus")
Debug.Print "Deleted folder C:\Bogus"
End Sub

2009年7月14日星期二

vb

google vb example

http://www.java2s.com/Code/VB/CatalogVB.htm
http://www.profsr.com/vb/vbintro.htm#content
http://patorjk.com/programming/vb6examples.htm
http://pages.cpsc.ucalgary.ca/~saul/vb_examples/index.html

关注者