Errors |
キーワード: adc, dac, analog to digital, digital to analog, microcontroller, op amp, uC
関連製品 |
#include "bitbanging_iomaxq200x.h" void main(void) { int wait; char DAC_out; PD0=0xFF; //Sets IO port 0 to output (This port shows the ADC result) PD3=0xFF; //Sets IO port 3 to output (This port connects to the DAC input) PD6_bit.bit2=0; //Sets IO port 6, pin 2, to input //This pin connects to the output of the comparator while(1) { //Set DAC output to the MAX (DAC output = 3.3v) at the beginning //Then decrease the DAC output 1 LSB at a time, //until the output of the comparator toggles low for(DAC_out=0xFF; DAC_out>=0; DAC_out--) { PO3=DAC_out; //Sets the value of the output port 3 to DAC_out //wait for the output of the comparator to settle for(wait=0; wait<500; wait++); //if the DAC output = 0V, and the output of the comparator is still 1 if(PI6_bit.bit2==1 && DAC_out==0) PO0=0; //Sets the ADC result = 0 else if(PI6_bit.bit2==1) continue; else //if the output of the comparator becomes 0 { PO0=PO3; //the ADC result = the value of the output port 3 break; } } } }
次のステップ | ||
EE-Mail | EE-Mail配信の登録申し込みをして、興味のある分野の最新ドキュメントに関する自動通知を受け取る。 | |
Download | ダウンロード、PDFフォーマット |
© , Maxim Integrated Products, Inc. |
APP 5074:
アプリケーションノート 5074, AN5074, AN 5074, APP5074, Appnote5074, Appnote 5074 |
お客様のアカウントに制限がかけられているためご注文をお受けすることができません。カスタマーサポートまでご連絡ください。
大変申し訳ありませんが、このサイトではビジネス/教育と関係のないEメールアドレスからのサンプル請求は受け付けておりません。オプション:
マキシムにご興味をお持ちいただきどうもありがとうございます。
マキシム・インテグレーテッドにご興味をお持ちいただきどうもありがとうございます。マキシムの無料サンプルプログラムは、暦年につきお客様に提供できる数量を限らせていただいております。誤ってこのメッセージをお受け取りになった場合はsamples-admin@maximintegrated.comまでご連絡ください。 あるいは ここをクリックして ご注文ください。
型番 | 説明 | 主な特長 |
---|
お客様の見積もり請求が送信されました。価格と入手性について24時間以内にお答えします。 お見積もり をご覧ください。ありがとうございました!
全てのお見積もりを見る会社アカウントの申請をご希望ですか