adc0831(adc0831).docVIP

  1. 1、本文档被系统程序自动判定探测到侵权嫌疑,本站暂时做下架处理。
  2. 2、如果您确认为侵权,可联系本站左侧在线QQ客服请求删除。我们会保证在24小时内做出处理,应急电话:400-050-0827。
  3. 3、此文档由网友上传,因疑似侵权的原因,本站不提供该文档下载,只提供部分内容试读。如果您是出版社/作者,看到后可认领文档,您也可以联系本站进行批量认领。
查看更多
adc0831(adc0831)

adc0831(adc0831) ADC0832 C program //============================================ //2005-03-28... 2005-03-29 The C51 program source file for the //ADC0834 module //FileName=ADC083X.c //#include #include DELAY_S.h #include ADC083X.h A predefined global variable external / //******************************************************* / / number: //HD_ADC083X_S01 / / function: / / port initialization / / input: / / no / / output: / / no //******************************************************** Voidadc083x_init (void) { SET_ADC083X_CS; SET_ADC083X_DO; CLR_ADC083X_CLK; #ifTYPE_VAL=ADC0832.html, target=, _blank, title=, ADC0832, ADC0832 and PDF SET_ADC083X_DI; #endif #ifTYPE_VAL=ADC0834 SET_ADC083X_SARS; #endif } //******************************************************* / / number: //HD_ADC083X_S02 / / function: Read data byte / / AD / / input: The //chanel channel number and the single and double end settings are selected, whose values are limited by type values! The effective value is select / / take a minimum of 4 and 3 respectively, 2 bit or not used / / specific values found in the PDF document! / / output: Result bytes for //AD conversion //******************************************************** Ucharadc083x_do_one_change (ucharchanel) { Uchardataad_val; Uchardatai; / / initialization before conversion SET_ADC083X_CS; CLR_ADC083X_CLK; SET_ADC083X_DO; CLR_ADC083X_CS; //SARS pins are not necessary when not in use to save pin resources! #if (TYPE_VAL==ADC0838) //chanel_.3.2.1.0=0000 channel 0+_ channel 1-, =001 channel 2+_ channel 3- (double ended mode) //SGL/DIFODD/SIGNSELECTSELECT=0010 channel 4+_ channel 5-, =011 channel 6+_ channel 7- (double ended mode) //=0100 channel 0-_ channel 1+, =0101 channel 2-_ channel 3+ (double ended mode) //=0110 channel 4-_ channel 5+, =0111 channel 6-_ channel 7+ (double ended mode) //=1000 channel 0+, =1001 Channel 2+ (single ended mode) //=1010 channel 4+, =1011 Channel 6+ (single ended mode) //=1100 channel 1+, =1101 Channel 3+ (sing

文档评论(0)

jgx3536 + 关注
实名认证
文档贡献者

该用户很懒,什么也没介绍

版权声明书
用户编号:6111134150000003

1亿VIP精品文档

相关文档