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

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

OK6410之ADC驱动硬件分析---阻塞与非阻塞IO_第1张图片

 

在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控制寄存器中:

OK6410之ADC驱动硬件分析---阻塞与非阻塞IO_第2张图片

 

在ADC数据寄存器中:

 

 

你可能感兴趣的:(OK6410之ADC驱动硬件分析---阻塞与非阻塞IO)