No.13427 作者:charlie22 邮件: ID:3663 登陆:3次 文章数:10篇 最后登陆IP:61.175.193.50 最后登陆:2003/9/16 19:00:43 注册:2002/11/4 15:01:00 财富:0 发帖时间:2002/11/4 15:02:00 发贴者IP:61.175.193.50 标题:charlie22:硬件:有人用过AD7706吗??SOS 摘要:No.13427硬件:有人用过AD7706吗??SOS 调了两天都不通啊!!! 硬件采用与52串口同步通信,即txd接7706-SCLK,rxd接7706的Din和Dout。(datasheet上的 典型电路) 7706寄存器读写和初始化程序如下: unsigned char read_7706() { unsigned char dat; RI=0; while(RI==0); dat=SBUF; return dat; } void write_7706(unsigned char dat) { TI=0; SBUF=dat; while(TI==0); TI=0; } /*;*** AD7706 ANALOGUE TO DIGITAL CONVERTOR CONFIGURATION ********************************* ; ;This is the AD7706 configuration routine ; ;The ADC configuration steps are as follows: ; 1)Write to the communications register specifying that the next operation to be a ; write to the clock register,select AIN1 (ie 0x20). ; ; 2)Write to the clock register appropiate settings (ie 0x0C) ; - Mclk out enabled ; - Input clock divided by two ; - Update rate of 20 ms or 50 Hz which gives ; a 3 dB digital filter cutoff of 13.1 Hz ; ; 3)Write to the comms register specifying that the next operation to be a write to ; the setup register and a calibration on channel ......
>>返回讨论的主题
|