Re: About A/D sample frequency and resolution
|
||||
---|---|---|---|---|
版主
|
有關AD的範例可以在右邊的下載區找到,但是資料是繁體中文的。
可以參考 W100 , W400 , Hi-Tech PICC , W401 及 W210 的教材。 http://www.microchip.com.tw/material.htm
發表於: 2005/3/11 9:55
|
|||
|
Re: About A/D sample frequency and resolution
|
||||
---|---|---|---|---|
資深會員
|
參照:
1. 模数转换器若不與單片機連接,數字要傳去哪裡?数模转换器若不與單片機連接,數字要從哪裡來?沒意義喔 2. PIC单片机如何进行数字信号处理 ... 不就一堆算數運算嗎,寫在程式裡就好啦 3. 模拟滤波器 ... analog filter ... 看需求啦,不一定需要 先去買本書,買塊實驗版,買套編譯器,動手做,拿示波器觀察 ... 多言無益,學而不思則罔,思而不學則殆,多動手吧
發表於: 2005/3/9 10:27
|
|||
|
Re: About A/D sample frequency and resolution
|
||||
---|---|---|---|---|
新會員
|
非常感谢大家的帮助,给了我很大的信心
冒昧的再提个问题: 模数转换器与数模转换器可不可以单独使用,即不与控制 器(单片机)相连,加晶振和电源, 也能实现改变采样频率和量化比特? PIC单片机如何进行数字信号处理? 是否进行A/D D/A 转换前后必须得加模拟滤波器?参数如何设置?
發表於: 2005/3/8 20:42
|
|||
|
Re: About A/D sample frequency and resolution
|
||||
---|---|---|---|---|
新會員
|
發表於: 2005/3/8 20:00
|
|||
|
Re: About A/D sample frequency and resolution
|
||||
---|---|---|---|---|
資深會員
|
采样频率 不是 Tad,Tad 是轉換一個 bit 所需的時間,
采样频率 是每秒鐘採樣的次數。 以下是用 CCS 公司的 C-compiler 寫的範例
// AD_DA.c --------------------------------------------------------------------
發表於: 2005/3/7 11:20
|
|||
|
Re: About A/D sample frequency and resolution
|
||||
---|---|---|---|---|
版主
|
1. 如果你要用C來編輯會比較簡單,PIC16F877A可以用 Hi-Tech PICC or CCS , PIC18Fxxxx則可以用MPLAB C18來編譯。 MPLAB C18 可以在"www.microchip.com"下載。
2. 16F877 及 18F452 的 ADC resoutions 是 10-bits, 最快轉換時間為19.2us ( 12Tad * 1.6uS), sampling time are 20uS therefore the totally conversion time are 39.2uS (19.2uS+20uS。 如果要更快一點可考慮PIC18F4520 轉換速度為 10uS。 3. 有關固定取樣轉換的機制,是可以用Timer來驅動的。例如有一聲音需以 8KHz的頻率取樣,則可以設定Timer 每隔 125uS 來中斷並啟動AD轉換,這樣AD就會成為8KHz的轉換。 4. PIC 的硬體 PWM 輸出最高解析度為 10-bits , 最高輸出頻率為 19.5KHz,你只要在加入一個 RC low pass filter 就可以成為一個具有10-bits的 DAC. 5. 有關範例程式可參考右邊 "教育訓練" 裡的講義 W410 教材
發表於: 2005/3/7 10:00
|
|||
|
Re: About A/D sample frequency and resolution
|
||||
---|---|---|---|---|
新會員
|
非常感谢
我想用C 编,感觉上Assemble会写很长且复杂 仍有一些困惑 1。怎样改变resolution? 8 or 10 or 4 bits? 不太懂 有没有比较现成的程序可参考 2。 采样频率。是Tad吗? 与外接时钟有何直接关系? 关于timer interrupt or simply delay loop 可否请您再详细解释? 有没有比较现成的程序可参考 因为我新手一个,对于编程很触,自学了好久也没有入门的感觉 还望高手赐教。
發表於: 2005/3/7 0:56
|
|||
|
Re: About A/D sample frequency and resolution
|
||||
---|---|---|---|---|
資深會員
|
1. resolution: you got only two choice with hardware, 8 or 10 bits. you can chop it down to 4 bit at your wish.
2. sampling freq.: you can use either timer interrupt or simply delay loop. 3. D/A: you can use either external DA or built-in PWM with simple external R-C low-pass. Please specify what kind of program you want, C code or Assembly ?
發表於: 2005/3/5 10:06
|
|||
|
About A/D sample frequency and resolution
|
||||
---|---|---|---|---|
新會員
|
Hello
i want to build a sample and quantization demonstrate board. It aims to build an A/D and D/A hardware interface and let the student use sample frequency and resolution (number of bits) to make experiment. And observe the result by investage the digital presatation(such as bit rate) and anologe output (such as audio). The anolog input can be a sine wave or square wave or sanjiao wave. At first I planned to use separate ADC and DAC(such as ADC0804, ADC0809 or DAC0832,MC1408) But it seems I still need a MCU. So I planned to use Singlechip such as PIC. But I am not sure How to chang the sample frequency and resolution?!!! An idea: Use pic16f877 3 channels are set different sample frquencies. And use PWM output DAC or connect a DAC(such as DAC0832) Anybody can give me some idea about the program?! and How to change the sample frequency and resolution?!!! Thank you cvery much
發表於: 2005/3/5 3:54
|
|||
|