Thursday, November 19, 2009

change runlevel in ubuntu

There is ni /etc/inittab file in Ubuntu because Ubuntu has /etc/event.d/rc-default file

You can fix this problem by editing /etc/event.d/rc-default file
First backup file,
Code:
sudo cp /etc/event.d/rc-default /etc/event.d/rc-default.bakup
Open vi /etc/event.d/rc-default
Code:
sudo vi /etc/event.d/rc-default
Find all lines read as - telinit 2 and replace with telinit 3
Code:
telinit 3
Reboot the system

Debian Linux

Debian, as well as most of the distributions based on it, like early Ubuntu, does not make any distinction between runlevels 2 to 5.

Debian Linux runlevels
ID Description
0 Halt
1 Single-User mode
2-5 Full Multi-User with console logins and display manager if installed
6 Reboot

[edit] Ubuntu

Ubuntu 6.10 (Edgy Eft) and later contain Upstart as a replacement for the traditional init-process, but they still use the traditional init scripts and Upstart's SysV-rc compatibility tools to start most services and emulate runlevels.

Wednesday, October 21, 2009

err when remod


ERROR: Removing 'hello': Device or resource busy

how to fix it? see below:
http://kerneltrap.org/node/15857

Thursday, October 8, 2009

HD on youtube

&fmt=18

add this code to the end of the url of youtube, you can watch HD video

Wednesday, September 16, 2009

gnd problem

之前已發現allegro中,gnd的rat已沒有顯示,
不過當時還以為如果沒有電氣連接,
在DRC check中可以檢查出來,
不過這次的電機控制板說明,是不可以的,
現在可以想到的解決辦法,
只能手工把這些網路連接起來。

Wednesday, August 26, 2009

RGBToJpegFile

BOOL JpegFile::RGBToJpegFile(CString fileName,
BYTE *dataBuf,
UINT widthPix,
UINT height,
BOOL color,
int quality) // quality value 1-100.



Friday, August 21, 2009

pins

;pin with fillet
FilletR=0.2
PadN=_PadSMFillet(PadX PadY)
_CreatePin(PadN Pad1_x:Pad1_y "1")
FilletR=oldFilletR

;round pin
PadN=_PadSM(PadX PadY)

;rectangle pin
PadN=_PadSM(PadX PadY t)

Wednesday, August 19, 2009

layout

Wednesday, August 12, 2009

Tuesday, August 11, 2009

Friday, August 7, 2009

Thursday, August 6, 2009

Tuesday, August 4, 2009

fullscreen control

FullScreenHandler.Maximize(this, GetActiveView());

Monday, August 3, 2009

The pcb

Thursday, July 30, 2009

LCM2002

Use it to make something interesting

Android on the board

Wednesday, July 29, 2009

Microscope photo

microScope


the program.

Friday, July 24, 2009

control board layout finished

and will cost 800RMB for 20pcs

arm11-s3c6410 development board

we will buy one

Wednesday, July 22, 2009

Friday, July 10, 2009

motion control IC

http://www.51zdh.com/product_3.htm

and MCX312 cost 400HKD,
a little expensive.

buy motor and driver

driver

motor

new theodolite control




can now reach the resolution to about 4''
and the performance can be improved by replace a better motor and a better driver

Thursday, July 9, 2009

plan for JWY

find a better solution for the JWY.

1. step motor
2. high divider
3. motion control

chip choose:
1. driver - THB6128, cheap and easy to buy
2. motion - TMC428, expensive and hard to buy, find another

if possible, find another better driver for higher divider

步进电机驱动芯片有:步进电机驱动芯片(UM12017、UM12014)完全代替VID6606、VID6608)

还有PMM8713,BY-5064,A3955SB,ULN2003,ULN2803,ULN2804,ULN2824

步进电机控制芯片有:UDN2916LB,TA8435H,TMC428,TMC236,TMC239,PBD3517,PBL3770,PBL3717,SPI-7210M,CIPH9803A,TMC222,等等。

Wednesday, July 8, 2009

step motor motion controller

need to develop some kind of step motor motion controller,

there are some ic to choose:

but you need to log in to download the data sheet of PMD.

the best choice is:
5 phase step motor
500 divider

but it would be too expensive?

...

Tuesday, July 7, 2009

led lamp for office

looking for some led lamp for office use today and take a note for it.

cree is a company offers some high performance led chip and lamp product, its website is: http://www.cree.com/

and there is one kind of neutral white color led:
Innovative Package – XLamp MC-E Color
specification:

Color
Max. Current (mA)
Dominant Wavelength (nm)
CCT
Min. Flux @ 350 mA
XLamp
MC-E
Color
Blue
700
450-465

8.2 lm
Green
700
520-535

67.2 lm
Red
700
620-630

30.6 lm
Cool White
700

5700K – 7000K
95 lm
---
Blue
700
450-465

8.2 lm
Green
700
520-535

67.2 lm
Red
700
620-630

30.6 lm
Neutral White
700

3700K – 4300K
80 lm

coefficient of utilization:


but we want to project the led array image to the desk, then we need a lens, the best solution is one led array plus one big lens, but until now i can not find the similar design on the market, most product will use one lens plus one led, but the design would be too big for our project,
much information can be found on this page: Efficient High Brightness LEDIL LED Lenses
and many types of shape can be projected like the below picture:

and there is some kind of high power led array on the market:

...

some kind of led light collector:
i wonder if one large lens can collect light from each led of a led array?

watch something interesting on youbube:

Saturday, July 4, 2009

投影技術

看現時的投影技術,基本上都是LCD,DLP,LCoS這幾種,而做到體積小巧的,DLP和LCoS就占大多數了。

LCoS體積最小,不過亮度不夠,一般是10 lumens左右,不知道是不是可以通過提高光源的功率來提高亮度。

DLP由於是利用反射的原理工作,所以提高光源功率就可以把投射亮度提高...

無心情寫,待續。

Wednesday, July 1, 2009

word中的等寬字體

一直以来,用word编辑文档时,里面的英文字体都是用times new roman ,可有时候会出现这样的情况,上下两排怎么也对不齐,原因是每个字符的宽度不一样,比如,在times字体下,I和L的宽度肯定是不同的。
普通文档也就罢了,如果是要编辑程序,这种现象会让代码显的很不规范。用等宽字体能够解决这个问题,在网上一查,word里的等宽字体大概有这么几种:
BatangChe 、 Courie、Courier New、DotumChe、Fixedsys、GulimChe、GungsuhChe、Lucida Console、Lucida Sans Typewriter、MingLiU、MS Gothic、MS Mincho、Terminal、仿宋_GB2312、楷体_GB2312、隶书、宋体-方正超大字符集、新宋体、幼圆等。

Thursday, June 25, 2009

DLP


Tuesday, June 16, 2009

LM629

finally the LM629 works,
many bugs in the program,
the example of the control diagram:

dc_motor_init_port();
dc_motor_chip_select();
dc_motor_reset_check();
dc_motor_RDSTAT();

dc_motor_RESET();
dc_motor_RDSTAT();


dc_motor_PORT8();
dc_motor_RDSTAT();

dc_motor_DFH();
dc_motor_RDSTAT();


dc_motor_LFIL();
dc_motor_RDSTAT();
dc_motor_UDF();
dc_motor_RDSTAT();


dc_motor_MSKI();
dc_motor_RDSTAT();


dc_motor_SBPA();
dc_motor_RDSTAT();

dc_motor_SIP();
dc_motor_RDSTAT();


dc_motor_RSTI();
dc_motor_RDSTAT();


dc_motor_MSKI();
dc_motor_RDSTAT();


dc_motor_LTRJ();
dc_motor_RDSTAT();


dc_motor_STT();
dc_motor_RDSTAT();

Tuesday, March 24, 2009

classes

QApplication
QWidget
QSpinBox
QSlider
QObject
QHBoxLayout
QLabel
QPushButton

styles

"windows", "motif", "cde", "plastique", "windowsxp", or "macintosh"

Monday, March 16, 2009

remote desktop

command:
rdesktop [ip]

Sunday, March 8, 2009

change grub setting

sudo gedit /boot/grub/menu.lst

Friday, March 6, 2009

ubuntu terminal right click

sudo apt-get install nautilus-open-terminal

Thursday, March 5, 2009

it is ready

everything is ready now,
i will turn into linux in the future,
that's cool~

channel 12 or 13 of wifi

when the ubuntu810 is newly installed on my laptop. the channel 12 and 13 is turned off because the OS think i am in a region where they are legal. how to turn them on? add the below line in "/etc/modprobe.d/options":

options cfg80211 ieee80211_regdom=EU

Thursday, February 26, 2009

flash plugin for firefox 64bit linux

download the .so file:
http://labs.adobe.com/downloads/flashplayer10.html

copy to:
~/.mozilla/plugins/libflashplayer.so

and it would be ok

ubuntu810 fit my dell very well


B43 wireless driver works perfect, but the STA driver does not work.

the video driver works well too and the 3D effect is great.

many work can be done under linux now~~

Thursday, February 19, 2009

control board problem

這塊板真出了不少問題,其實,在畫的時候就覺得害怕的了,因為狀態實在是很差,出是問題就一個一個的爆出來了。

最重要的一個問題應該是,把電子開關接在DC的負極上了,這樣雖然可使電路簡單些,但卻帶來了不少其它問題,斷開了負極,但去會由其它信號線連上而失去作用,解決的辦法和以后都要注意的應該是,不要貪簡單,晝用IC來實現功能,後面要做的,就是要用一塊電子開關IC來實現這個功能。

還有一些元件的封裝問題,還是有一些新的器件因為粗心問題而出錯,以后一定要逐一元件都檢查清楚。

還會有一些問題出現,還要記錄清楚,問題可以出,但不能出現兩次。

Tuesday, February 17, 2009

3d desktop on my dell 1501

11.1
11
10.3
they all can not show the beautiful cube on my dell 1501, i just remember that once it worked on a older version maybe 10.0
i hope some day this problem can be fixed.

winxp + linux

如果安裝了雙系統,在重裝xp的時候,格式化了硬盤分區,重啟后就提示分區表不對,這時候,好像可以用linux盤來恢復,當然也可以在裝xp時,把整個硬盤都重新分區。

Wednesday, February 4, 2009

kde4

beautiful~

Tuesday, February 3, 2009

autocad command

改变坐标系:
UCS -> N -> input new C

放大缩小:
scale

Monday, February 2, 2009

import dxf to allegro

there is a error:
"SHAPE boundary is illegal"
当我把单位做mil导入时,并不错误,但当以mm导入时,就有这个错误,
不过,如果用mil导入时,太大了,在allegro中怕不能弄小,
又当在autocad中把图scale变小后,再用mil导入,上面这个错误又会再出现,
暂时不知如何解决。等待下面出现PS

PS:
问题是这样解决的:
新建一个format symbol后,要即时把设计单位改为mm,这样才能与导入的单位对应,生成symbol后,再在board中放置format symbol就不用有问题了。




PS:
有时生成的symbol,place时会有这样的错误:
SPMHAW-113
一时忘了上面的错误是怎么出现的……,真想晕。
而且,在artwork时,有些symbol也显示不出来,那就是symbol本身的错误了,
后来,那个IC logo就有这样的错误,要用BMP图转成DXF,然后再导入allegro中才显示正常。
另外,图的像素不可以太高,否则对artwork来说会很吃力,一般来说,在mm与像素之间是十倍的关系就可以了,也就是说,一个10mm * 10mm的图,其像素是100pixel * 100pixel也就对了。

Saturday, January 24, 2009

wireless router

how to setup?

1. power up the router, and reset it if needed. press the reset button for about 5 seconds to reset the wrt54gc.
2. disable other internet devices if needed. enable the wireless device. and connect the wireless signal.
3. open ie or firefox and input address: 192.168.1.1 to login. name and password: admin
4. then you can login and change your setting.
5. if use with a DSL device, go to the pppoe setting and input the user name and the password. save the setting and go next.
6. restart the DSL device and the router, reconnect the wifi.

it would then work :)

you can change many setting in the setting window of the router~, do not open the wifi signal, it would not be safe...

Friday, January 23, 2009

about fanout


Design parameter editor->route->create fanout->create fanout parameter

about shape


Setup->Design Parameter Editor->Shape->Edit global dynamic shape paramatic...


Setup->user preferences->Display->Shape fill->no_shape_fill

Wednesday, January 21, 2009

via and fanout

you have to add at least one type of via at you design before you can use the fanout function.

set up via in CM:
open CM->Physical->all layers->vias(click to open a new window to add the via you want)

via examples:
VIA70-35-100 (small size)
VIA110-60-140 (large size)

when use fanout funciton:
fanout by click-> right click mouse->setup

cadence 16.2

install cadence 16.2 today, found it works well with FPM



PS:
装上这个版本使用后,发现之前那个16.0中出现的一些奇怪的问题都没有了,真好,继续使用这个版本。
另外还发现这个版本出现了一些新功能,慢慢学习……

Tuesday, January 20, 2009

package area problem

FPM的问题真是越来越多,一个正常的package,应该像下图的一样,没有多余的空版面才对。











但今天发现有两个用FPM生成的封装,却出现了大面积的多余空间,像下一个图所示。



















这是为什么呢,原因也是未知。曾对着两个skill文件一行一行对比过,但也没有结论,这样在生成PCB时,也会占用一定的空间,有时会出现不能缩小画图空间尺寸的问题,还不知道会不会在制板时出现问题,由于有以上的担心,所以这两个封装还是要改过来,不过问题原因未知,改起来会麻烦一点,只能再找一个正常的文件,小心翼翼的改过来了。

Monday, January 19, 2009

shape symbol

在制作shape symbol时,
制作步骤大概是这样:
1. 在allegro中,new->shape symbol
2. Add->...
3. then add the shape
4. File->create symbol
...
在画shape时,可以通过在命令行中输入坐标的办法来实现,如:
x 10 10
ix 10
iy 10

不过在这个shape symbol生成后,再用FPM来制作封装,却有一个问题,就是shape symbol与想要的坐标对不上,而且,在修改过shape symbol的原点坐标后还是不能对上,这个问题有待再解决。

PS:
1. 制作ssm时,当到坐标为从原点开始到实际大小尺寸坐标,FPM所得结果为:




















2. 当原点取中心时,所得结果为:



















可见,pin都没有对上。

PS:
今天早上,这个问题终于解决。主要是在画shape symbol时,要注意偏移量,原点应该在焊盘中心;而在画pad时,要注意FPM加载的是啊个pad,对应在相应的pad中load入shape。
此例中:
1. 由于FPM生成QFN65P400X400X100-17B时,说找不到shape symbol - SRX0_45Y1_13R0_10,所以就要用allegro生成相应的shape symbol。输入坐标时:
x -0.225 -0.565
x 0.225 0.565
这样,中心便在原点。
2. 再用FPM生成封装,会发现不对,点焊盘看,原来使用的焊盘为:RX0_35Y1_02R0_10T, 所以用pad designer打开这个pad,或者干脆自己新建一个pad,再在这个pad中load入上面生成的shape symbol。
3. 再次用FPM生成封装,这次对了。见图: