さまざまな PIC マイクロコントローラーに搭載されている A/D の最大物理レート (ナイキスト性能限界) を評価しようとしています。
ただし、計算を行うには、データシートに明示的に記載されていないパラメーター、具体的には Tacq、Fosc、TAD、および除数パラメーターが必要です。
いくつかの仮定を立てて進めましたが、サニティ チェックを行うと役立ちます。最大物理レートの計算を正しく行っていますか?
説明のみを目的として、ADC を備えた最も単純な PIC10F220 を取り上げました。これは、Tacq、Fosc、TAD、および除数パラメータの解釈に特に焦点を当てるためのものであり、この非常に基本的なチップに実用的な機能を実装できることを示唆するものではありません。(これは、以下のコメントでのクリフォードのポイントです。)
計算:
Nyquist Performance Analysis of PIC10F220
- Runs at clock speed of 8MHz.
- Has an instruction cycle of 0.5us [4 clock steps per instruction]
そう:
- Get Tacq = 6.06 us [acquisition time for ADC, assuming chip temp. = 50*C]
[from datasheet p34]
- Set Fosc := 8MHz [? should this be internal clock speed ?]
- Set divisor := 4 [? assuming this is 4 from 4 clock steps per CPU instruction ?]
- This gives TAD = 0.5us [TAD = 1/(Fosc/divisor) ]
- Get conversion time is 13*TAD [from datasheet p31]
- This gives conversion time 6.5 us
- So ADC duration is 12.56 us [? Tacq + 13*TAD]
次のサンプルの前にリアルタイムで実行される単純なロード/ストア/しきい値の 10 の命令を想定します (これは単なるスタブです。ポイントは残りの計算です)。
- This adds another 5 us [0.5 us per instruction]
- To give total ADC and handling time of 17.56 us [ 12.56us + 1us + 4us ]
- before the sampling loop repeats [? Again Tacq ? + 13*TAD + handling ]
- If this is correct, then the max sampling rate is 56.9 ksps [ 1/ total time ]
- So the Nyquist frequency for this sampling rate is 28 kHz. [1/2 sampling rate]
つまり、このシステムの (理論上の) パフォーマンス --- 仮想のリアルタイム処理コードを使用したチップの A/D --- は、28 kHz に帯域制限された信号用です。
これは、Tacq、Fosc、TAD、および除数パラメーターを取得し、それらを使用してこのチップの最大物理レートまたはナイキスト性能限界を取得する際のデータシートの正しい割り当て/解釈ですか?
ありがとう、