扩展adc2
摘要:stc89c52上测试#include
#include
#define uchar unsigned char
#define uint unsigned int sbit st=P2^4;//A/D转换控制
sbit ale=P2^3;//通道控制
sbit oe=P2^5;//输出控制
sbit eoc=P3^7;//转换结束标志
sbit addr_a=P2^0;
sbit addr_b=P2^1;
sbit addr_c=P2^2; void delay(uchar x)
{ uint a,b; for(a=x;a>0;a--) for(b=110;b>0;b--);
}
阅读全文
posted @
2011-12-20 06:51
_song
阅读(247)
推荐(0)
lcd flash sdram
摘要:lcdmake menuconfig:Device Drivers ---> Graphics support ---> Support for frame buffer devices ---> S3C2410 LCD framebuffer supportdevice node: /dev/fb0file: drivers/video/s3c2410fb.cAnother configuration item in the same page is: LCD select (7 inch 800x480 TFT LCD) .then 7 inch lcd will wor
阅读全文
posted @
2011-12-18 17:08
_song
阅读(326)
推荐(0)
dm9000 driver 2
摘要:micro24401.EINT7 中断2.LnoE 读选通3.LnwE 写选通4.LnGCS4 片选网卡和sdram,norflash都是统一编址到2440的bank区间。dm9000的片选信号接到了2440的LnGCS4,所以dm9000的bank空间应该是bank4,范围是2千万-2千8百万所以在mach-mini2440.c,根据接线方式指定网卡的基地址应该为2000 0000。但是如下/* DM9000AEP 10/100 ethernet controller */
#define MACH_MINI2440_DM9K_BASE (S3C2410_CS4 + 0x300)
//#de
阅读全文
posted @
2011-12-17 15:56
_song
阅读(287)
推荐(0)
dm9000 driver 1
摘要:资料dm9000-中文dm9000--aemake menuconfigDevice Drivers ---> [*] Network device support ---> [*] Ethernet (10 or 100Mbit) ---> DM9000 supportdm9000的结构图比较清晰,外层是platform,内层是net_device。平台设备在mach-mini2440.c注册,平台驱动在dm9000.c的init注册。net_device在平台的probe注册。************************************************
阅读全文
posted @
2011-12-17 07:55
_song
阅读(440)
推荐(0)
serial driver 2
摘要:2440的串口结构和51的对比一下会更清楚一点512440image from http://blog.csdn.net/mr_raptor/article/details/655613351的发送器:单缓冲--或叫没缓冲---SBUF,接收器:双缓冲---SBUF+shiftreg。2440的发送接收都是双缓冲---fifo+shiftreg。micro2440的串口连线com0独自使用一个max232,并且具备AFCcom1 com2共同使用一个max232max3232即一个电平转换的芯片,T1IN即TTL 1 IN即0-5v的电平in,R1IN即RS232 1 IN即+-10v的电平i
阅读全文
posted @
2011-12-17 07:54
_song
阅读(268)
推荐(0)
serial driver 1
摘要:make menuconfig:1.Device Drivers ---> Character devices ---> Serial drivers ---> Samsung Soc Serial supportobj-$(CONFIG_SERIAL_CORE) += serial_core.o 是串口核心obj-$(CONFIG_SERIAL_SAMSUNG) += samsung.o 是串口具体实现2.控制台终端计算机显示器通常被称为控制台终端(console)。必须有一个(些)特殊文件与console相关联,比如虚拟终端tty1 tty2 串口ttySAC0 ttyS
阅读全文
posted @
2011-12-17 07:54
_song
阅读(371)
推荐(0)
network packet
摘要:UDP datagram UDP数据报The unit of data that TCP sends to IP is called a TCP segment tcp报文 tcp段The unit of data that IP sends to the network interface is called an IP datagram ip数据报The stream of bits that flows across the Ethernet is called a frame帧搜索ch取得线索/**********************************************
阅读全文
posted @
2011-12-13 06:40
_song
阅读(438)
推荐(0)
arp
摘要:arp的发出http://wenwen.soso.com/z/q186504408.htmarp欺骗http://www.visualland.net/view.php?cid=863&protocol=ARP&title=7.%20ARP%20spoofingarp代理http://blog.c114.net/html/15/562315-87382.html
阅读全文
posted @
2011-12-10 13:56
_song
阅读(208)
推荐(0)
git
摘要:下载msysGit:http://code.google.com/p/msysgit/downloads/listTortoiseGit: http://code.google.com/p/tortoisegit/downloads/listGit-1.7.9-preview20120201.exe TortoiseGit-1.7.7.0-32bit.msi先安装git再安装tortoisegit,否则就要在tortoisegit的setting中设置git的路径
阅读全文
posted @
2011-12-09 07:06
_song
阅读(204)
推荐(0)
svn
摘要:refer to http://blog.csdn.net/Raptor/article/details/3228891.下载并安装TortoiseSVN-1.7.2.22327-win32-svn-1.7.2.msihttp://tortoisesvn.net/2.在u盘(J盘)建立Local Repository新建文件夹j:/svn/project1,然后右键选择create repository here,如下3.创建工作文件夹,比如d:/working/project1,然后右键选择svn checkout,如图弹出如下,直接点ok就可以取得最新版本的代码如果想要取得google c
阅读全文
posted @
2011-12-09 06:38
_song
阅读(349)
推荐(0)
网址收藏 plc实现
摘要:1http://www.doc88.com/p-28431595979.html2智能化嵌入式可编程控制器及其集成开发系统的研制3http://www.docin.com/p-62693005.html#4.http://www.doc88.com/p-43249953091.html
阅读全文
posted @
2011-12-05 08:41
_song
阅读(201)
推荐(0)
spi 外设驱动(spi_driver)
摘要:spi驱动模型和i2c的类似,都按照主机外设分离来设计的。但我觉得比i2c的要简明好多。上文配置的spi驱动最外层是platform总线然后是spi总线然后是字符设备。spi驱动模型分为spi主控制器驱动,对应结构体spi_master-spi_s3c24xx.c。控制怎么发。spi外设驱动,对应结构体spi_driver-----spidev.c。实现与用户的接口。***************************************************************************************对于te6410,linux2.6.36.2 2012-
阅读全文
posted @
2011-12-03 15:58
_song
阅读(1226)
推荐(0)
spi 主机控制器驱动(spi_master)
摘要:spi_master/* linux/drivers/spi/spi_s3c24xx.c * * Copyright (c) 2006 Ben Dooks * Copyright (c) 2006 Simtec Electronics * Ben Dooks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the F...
阅读全文
posted @
2011-12-03 08:37
_song
阅读(838)
推荐(0)
spi test
摘要:硬件协议http://www.mct.net/faq/spi.htmlhttp://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bushttp://baike.baidu.com/view/245026.htm软件①.添加spi平台设备在arch/arm/plat-s3c24xx/devs.c已经定义了spi平台设备3c_device_spi0和3c_device_spi1,如下/* SPI (0) */ static struct resource s3c_spi0_resource[] = { [0] = { .start =...
阅读全文
posted @
2011-12-03 05:59
_song
阅读(640)
推荐(0)
扩展adc 1
摘要:ti系列Precision ADC (10MSPS)http://focus.ti.com/paramsearch/docs/parametricsearch.tsp?family=analog&familyId=2020&uiTemplateId=NODE_STRY_PGE_T1.adc0808 8通道并口http://baike.baidu.com/view/3791579.htmhttp://www.ti.com/product/adc08082.adc0809 8通道并口 IN0~IN7:8路模拟量输入端。 2-1~2-8:8位数字量输出端。http://baike.b
阅读全文
posted @
2011-12-03 03:38
_song
阅读(235)
推荐(0)
i2c--ioctl--主机控制器驱动(i2c_adapter)--外设驱动(i2c_driver)
摘要:updating...i2c驱动目录[root@localhost i2c]# pwd
/opt/FriendlyArm/mini2440/linux-2.6.32.2/drivers/i2c
[root@localhost i2c]# tree //.有省略
|-- Kconfig
|-- Makefile
|-- algos
| |-- Kconfig
| |-- Makefile
| |-- built-in.o
| |-- i2c-algo-bit.c
| |-- i2c-algo-pca.c
| |-- i2c-algo-pcf.c...
阅读全文
posted @
2011-12-02 08:07
_song
阅读(805)
推荐(0)
i2c--insmod
摘要:micro2440装备的是at24c08配置内核的i2c主机控制器驱动Device Drivers ---> I2C support --->I2C Hardware Bus support ---> S3C2410 I2C Driver 。这里把它配置成模块形式,并重新编译烧写内核。查看该项目的help:symbol: I2C_S3C2410 [=m],然后再根据Kconfig和Makefile可知对应的原文件是i2c-s3c2410.c。编译出的模块文件是 i2c-s3c2410.ko,将其下载到板子上insmod时出现如下信息:[root@FriendlyARM plg
阅读全文
posted @
2011-12-02 07:04
_song
阅读(391)
推荐(0)
i2c--test
摘要:硬件http://www.i2c-bus.org/how-i2c-hardware-works/http://www.xinqi.cn/pdf/cun/at24cxx.pdfhttp://download.csdn.net/detail/songqqnew/4438714http://download.csdn.net/detail/songqqnew/4438746测试***********************************************************************************************使用ioctl( ,I2C_SMBU
阅读全文
posted @
2011-12-01 18:56
_song
阅读(1319)
推荐(0)
algorithm
摘要:algorithm ['ælɡəriðəm]算法 genetic algorithm遗传算法encryption algorithm加密算法pseudo ['psju:dəu] n. 伪君子;假冒的人adj. 冒充的,假的pseudo-terminal 伪终端
阅读全文
posted @
2011-12-01 10:17
_song
阅读(814)
推荐(0)
换底板2-之核心板
摘要:核心板已经是最小系统板了,只要从外部把5v的电源供上,核心板就可以正常进入nor或nand的bootloader。J1短接进入nand的bootloader,J1断开Nor。(我的板子nand里是uboot,nor里是supervivi)继续进入linux会卡在dm9000处。就在内核中把dm9000设备移除,如下,重新编译烧写即可。/opt/FriendlyArm/mini2440/linux-2.6.32.2/arch/arm/mach-s3c2440/mach-mini2440.cstatic struct platform_device *mini2440_devices[] __in
阅读全文
posted @
2011-12-01 09:22
_song
阅读(342)
推荐(0)