1 2 3 4 5 6 7 8 9 10 11 | #中国科技大学 deb http://debian.ustc.edu.cn/ubuntu/ jaunty main restricted universe multiverse deb http://debian.ustc.edu.cn/ubuntu/ jaunty-backports restricted universe multiverse deb http://debian.ustc.edu.cn/ubuntu/ jaunty-proposed main restricted universe multiverse deb http://debian.ustc.edu.cn/ubuntu/ jaunty-security main restricted universe multiverse deb http://debian.ustc.edu.cn/ubuntu/ jaunty-updates main restricted universe multiverse deb-src http://debian.ustc.edu.cn/ubuntu/ jaunty main restricted universe multiverse deb-src http://debian.ustc.edu.cn/ubuntu/ jaunty-backports main restricted universe multiverse deb-src http://debian.ustc.edu.cn/ubuntu/ jaunty-proposed main restricted universe multiverse deb-src http://debian.ustc.edu.cn/ubuntu/ jaunty-security main restricted universe multiverse deb-src http://debian.ustc.edu.cn/ubuntu/ jaunty-updates main restricted universe multiverse |
Archive for April, 2009
This application helps you find and remove software packages you might not need anymore. It also suggests configuration changes that might benefit you. 这个小软件是在ubuntu新的发布版本里面刚刚加入的,是个不错的家伙。它给你提供了一个清理系统中“软件”的可视化的解决方案。
功能描述
功能很简单,程序更简单:
简单的蜂鸣器实验程序:本程序通过在P1.1输出一个音频范围的方波,驱动实验板上的蜂鸣器发出蜂鸣声,其中包含有一个定时模块,作用是使输出的方波频率在人耳朵听觉能力之内的20KHZ以下,如果没有这个延时程序的话,输出的频率将大大超出人耳朵的听觉能力,我们将不能听到声音。更改定时常数,可以改变输出频率,也就可以调整蜂鸣器的音调。
功能描述
由p1口外接按键开关,p3.3接蜂鸣器组成。
1 2 3 4 5 6 7 8 9 | org 8000h ;定位 ljmp start org 8100h start: mov sp, #60h mov tmod, #10h ;置T1为方式1 ; mov tl1, #010h ; mov th1, #010h ;设初值,定时为50ms setb tr1 ;启动定时器T1 |
功能描述
正常情况下(p3.2为高电平), p3.3的电平以一定的频率连续翻转,当p3.2为低电平时,触发int0外部中断,进入中断服务程序,另p3.3保持低电平,并将p1端口加1。p3.2外接一个按键开关时,中断服务程序有防抖动的功能,这时通过一定的延时(通常为10ms–20ms)来实现的。
程序
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | org 8000h ;定位 ljmp start org 8003h ;中断向量 ljmp int_0 org 8100h start: mov sp, #60h setb ex0 ;开int0中断 setb ea ;开总中断 mov tcon, #00h ;低电平触发 mov r3, #00h mov a, r3 cpl a loop3: ;死循环 mov p1, a cpl p3.3 ;翻转 lcall DELAY ;延时 sjmp loop3 int_0: ;中断服务子程序 push psw lcall DELAY ;防抖动 setb p3.3 inc r3 mov a, r3 cpl a mov p1, a jnb p3.2, $ ;查询,防止多次中断 lcall DELAY ;还是防抖动 pop psw reti DELAY: PUSH 06H PUSH 07H MOV R7, #70H LABEL1: MOV R6, #70H LABEL2: DJNZ R6, $ DJNZ R7, LABEL1 POP 07H POP 06H RET END |
89C51单片机,每计时一秒将P1端口翻转一次,晶振频率12MHz,中断方式实现。这里另外一个查询方式的实现
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | org 8000h ;定位 ljmp start org 801bh ;中断向量 ljmp int_t1 org 8100h start: mov sp, #60h mov tmod, #10h ;置T1为方式1 mov tl1, 0fch mov th1, #4bh ;设初值,定时为50ms mov r1, #20 ;中断次数,以使定时为1ms setb tr1 ;启动定时器T1 clr a ;累加器清零 setb et1 ;T1中断允许 setb ea ;开总外部中断标志 sjmp $ ;等待中断 int_t1: ;中断服务子程序 push psw ;保存程序状态字 mov tl1, #0fch ;重装计数器 mov th1, #4bh djnz r1, exit ;1s时间未到,返回主程序,等待下一次中断 mov r1, #20 ;1s时间到,重装r1 cpl a ;a取反 mov p1, a ;输出a exit: pop psw ;程序状态字出栈 reti DELAY: PUSH 06H PUSH 07H MOV R7, #70H LABEL1: MOV R6, #70H LABEL2: DJNZ R6, $ DJNZ R7, LABEL1 POP 07H POP 06H RET END |
89C51单片机,每计时一秒将P1端口翻转一次,晶振频率12MHz,这里另外一个中断方式的实现
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | org 8000h ;定位 ljmp start org 8100h start: mov sp, #60h mov r1, #20 clr a mov tmod, #10h ;置T1为方式1 loop: mov tl1, 0fch mov th1, #4bh ;设初值,定时为50ms setb tr1 ;启动定时器T1 jnb tf1, $ ;查询TF1是否溢出 clr tf1 ;清除溢出标志 djnz r1, loop ;1s时间未到,重装计数器 mov r1, #20 ;1s时间到,重装r1 cpl a ;a取反 mov p1, a ;输出a ljmp loop END |
ubuntu每次关机时都会“嘀”的一声,在笔记本中则可能是“嘟嘟”的巨响,而且终端的操作也经常会发出这种声音,甚是难听!彻底解决的办法是禁用驱动系统喇叭的内存模块,在终端输入命令:
sudo modprobe -r pcspkr |
或者:
sudo rmmod pcspkr |
Here I am in the contemporarily latest distribution of ubuntu 9.04. The problem showed up when I updated the firefox to the version 3.0.9, that firefox kept telling me to restart for an update in every tabs in terms of “your browser has been updated and needs to be restarted”. While searching the solution online, I found this a bug of firefox, which is caused by a plugin. So I went to the menu: Tools>>Add-ons and disabled the plugin called “ubuntu firefox modification”, then after I restarted the firefox, the trouble is gone.
您的浏览器已经更新,需要重新启动。可能的解决办法:firefox的工具>>附加组件,关闭 Ubuntu Firefox Modification组件,重启浏览器即可。
安装前的准备
首先, 要知道你的显卡的型号, 并下载到相应的驱动程序. 我的显卡是集成的, nVidia Geforce 6100 nForce 405, 在nvidia的驱动支持列表里面可以找到,同时在驱动下载页面搜索并下载到名如NVIDIA-Linux-x86-180.51-pkg1.run
接着,安装编译驱动程序所需要的包: build-essential pkg-config xserver-xorg-dev libc-devsudo 等等。
$ sudo apt-get install build-essential pkg-config xserver-xorg-dev libc-devsudo |