OK6410之ADC驱动硬件分析---阻塞与非阻塞IO

 在OK6410开发板中,有AD CONVERT部分,接口为XDAC_AIN0

 

在S3C6410的PDF中:

The 10-bit/12-bit CMOS ADC (Analog to Digital Converter) is a recycling type device with 8-channel analog
inputs. It converts the analog input signal into 10-bit/12-bit binary digital codes at a maximum conversion rate of
1MSPS with 5MHz A/D converter clock. A/D converter operates with on-chip sample-and-hold function. The
power down mode is supported. 

 

转换速度:

When the PCLK frequency is 50MHz and the prescaler value is 49, total 10-bit or 12-bit conversion time is as
follows.
  A/D converter freq. = 50MHz/(49+1) = 1MHz
  Conversion time = 1/(1MHz / (5cycles)) = 1/200KHz =5 us

 

触摸屏接口模式:

1. Normal Conversion Mode (AUTO_PST=0, XY_PST=0)
The operation of this mode is identical with AIN0~AIN3’s. It can be initialized by setting the ADCCON (ADC
Control Register) and ADCTSC (ADC touch screen control register). All of the switches and pull-up resister
should be turned off (reset value 0x58 makes switches turn-off). The converted data can be read out from
ADCDAT0 (ADC conversion data 0 register). 

 

在AD数据采集中,编程方式可采用中断或轮询的方式:在中断方式中,如果采集完毕,硬件会产生中断,在Linux驱动中断编号为IRQ_ADC

1.  The A/D converted data can be accessed by means of interrupt or polling method. With interrupt method, the
overall conversion time - from A/D converter start to convert data read - may be delayed because of the return
time of interrupt service routine and data access time. With polling method, by checking the ADCCON [15] –
end of conversion flag – bit, the read time from ADCDAT register can be determined.

ADC寄存器:

 

在ADC控制寄存器中:

 

在ADC数据寄存器中:

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值