2023年全國碩士研究生考試考研英語一試題真題(含答案詳解+作文范文)_第1頁
已閱讀1頁,還剩9頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領

文檔簡介

1、<p>  附錄1 外文文獻及中文翻譯</p><p>  Analog-to-Digital Conversion Utilizing the</p><p>  AT89CX051 Microcontrollers</p><p>  The Atmel AT89C1051 and AT89C2051.microcontrollers feature

2、on-chip Flash,low pin count, wide operating voltage,range and an integral analog comparator.This application note describes two low-cost analog-to-digital conversiontechniques which utilize the analog comparato r in the

3、AT89C1051 and AT89C2051 microcontrollers.</p><p>  RC Analog-to-Digital Converter</p><p>  This conversion method offers. An extremely low component count at the expense of accuracy and conversi

4、on time. In the example presented below,resolution is better than 50 millivolts, accuracy is somewhat less than a tenth of a Volt and conversion time is seven milliseconds or less.</p><p>  As shown in Figur

5、e 1, the RC analog-todigital. conversion method requires only two resistors and a capacitor in addition to the AT89CX051 microcontroller. A microcontroller output (pin 11), which swings from approximately ground to VCC,

6、alternately charges and discharges the capacitor connected to the </p><p>  non-inverting input of the internal comparator (pin 12). The microcontroller</p><p>  measures the time required for t

7、he voltage on the capacitor to match the unknown voltage applied to the inverting input of the internal comparator (pin 13).The unknown voltage is a function of the measured time.</p><p>  The HP5082-7300 LE

8、D displays shown in Figure 1 are not required for the conversion, but are utilized by the software to implement a simple two-digit voltmeter.The result of the analog-to-digital conversion is displayed in volts and tenths

9、 of a volt on the two displays. The voltmeter application does not utilize the full resolution of the RC conversion software,but serves to demonstrate the method as well as providing a tool for debug.</p><p>

10、;  The waveformfor a typical capacitor charge/discharge cycle is shown in Figure2. The discharge portion of the curve is identical to the charge portion rotated about the line VC = VCC/2. The equations and discussion bel

11、ow apply to the charge portion of the cycle, except where indicated.</p><p>  The voltage on the capacitoras a function of time is given by the exponential equation:</p><p>  VC=VCC(1-e-t/RC)

12、 (1)</p><p>  where VC is the voltage on the capacitor at time t, VCC is the supply voltage and RC is the product of the values of the resistor and capacitor. Note tha

13、t voltage is expressed in Volts, time in seconds, resistance in Ohms and capacitance in Farads. The product RC is also known as the “time constant” of the network and affects the shape of the waveform. The waveform is st

14、eepest when capacitor charging or discharging begins and flattens with time.</p><p>  The first problem with the RC conversion method is the difficulty of solving the exponential equation without utilizing f

15、loating point calculations and transcendental functions. On a compressed time scale, the exponential curve appears straight over much of its length, suggesting that it might be approximated by a line. This scheme fails d

16、ue to the continuous variation in slope over the length of the curve, which produces significant error. It also does not address the problemwhere the curve rol</p><p>  The microcontroller need not solve the

17、 exponential equation in real time if a lookup table is used to map pre-calculated values to each sampled time interval. This scheme allows the data to be encoded and formatted as required by the application while simpli

18、fying the conversion software. Symmetries in the data may be exploited to reduce the size of the table.</p><p>  The second problem with the RC conversion method is the substantial error which results from v

19、ariations in component values. Figure 3 shows an exaggerated view of the variation in the voltage on the capacitor due to variations in the values of the resistor and capacitor. As shown in the figure, the variation in t

20、he voltage on the capacitor decreases as the voltage on the capacitor decreases.</p><p>  The symmetry of the capacitor charge/discharge cycle can be exploited to reduce the effect of variations in component

21、 values on conversion accuracy. This is done by utilizing the charge portion of the cycle to measure voltages less than VCC/2 and the discharge portion to measure voltages greater than VCC/2. The worst case error is redu

22、ced to the error at VCC/2.</p><p>  Before component values can be assigned, the time interval at which the comparator output is to be sampled must be determined. The sample interval should be as short as po

23、ssible to maximize converter resolution and minimize conversion time. The sample interval is limited by the time required to execute the requisite code, which is determined by the clock rate of the microcontroller. In th

24、e voltmeter application, the microcontroller operates with a 12-MHz clock, resulting in a sample interval of </p><p>  The time constant (RC) affects the shape of the capacitor charge/discharge waveform. The

25、 value of the time constant must be chosen so that the steepest parts of the waveform are resolvable to the desired resolution. The steepest part of the charge portion of the waveform occurs near the origin, while the st

26、eepest part of the discharge portion occurs near VCC. Due to the symmetry of the waveform, the same time constant may be used for measurements made on either portion of the waveform.</p><p>  Figure 4 shows

27、an expanded view of the relationship between voltage and sample time near the origin. In the figure, V is the desired voltage resolution of the converter and t is the sample interval determined previously. The curve labe

28、led ’VC’ represents the voltage on the capacitor,</p><p>  which appears linear at this scale. In the figure, the slope of the curve is ideal, causing sampling to occur near the center of the voltage interva

29、ls. The slope of the curve may be less than shown, but may not be greater, or resolution will be lost. Note that the first sample is offset from the origin by1/2to center the sample in the first voltage interval. To obta

30、in the minimum value of the time constant which will produce the required slope at the first sample, solve Equation 1 for RC:</p><p>  RC=-t/1n(1-VC/VCC) (2)</p&

31、gt;<p>  Then set to the minimum desired resolution (0.05-volt), to the sample interval determined previously (five microseconds), and calculate RC at the first sample point, where </p><p>  VC = 1/

32、2 and t = 1/2 :</p><p>  The product of the values of R and C must not be less than the calculated minimum time constant. Utilizing a resistor with a one percent tolerance and a capacitor with a five percen

33、t tolerance</p><p> ?。≧norm-1%)(Cnorm-5%)>4.99*10-4</p><p>  In the voltmeter application, the selected values of R and C are 267 kilohms and 2 nanofarads, respectively, yielding a minimum ti

34、me constant of approximately 5.02?10-4. An additional constraint is placed on the value of R. Referring again to Figure 1, note the 5.1 kilohm pullup resistor</p><p>  connected to pin 11 of the microcontrol

35、ler. This resistor is present to supplement the microcontroller’s weak internal pullup, but has the detrimental effect of changing the time constant of the RC network during the charge portion of the capacitor charge/dis

36、charge cycle. This produces an asymmetry in the charge/discharge waveform, which contributes to conversion error. To minimize the effect of differences in the capacitor charge and discharge paths, the value of R should b

37、e chosen to be much g</p><p>  The time constant (RC), which is a function of the desired converter resolution, determines the duration of the capacitorcharge/discharge cycle. The more time required for the

38、capacitor to charge and discharge, the greater the number of samples required in the measurement loop and the greater the number of entries in the lookup table.</p><p>  Figure 1. Typical Capacitor Charge/DI

39、scharge Cycle</p><p>  Figure 2. Capacitor Voltage Variation as a Function of RC Variation</p><p>  Figure 1. Figure 2</p><p>  Cto the symmetry of the capacito

40、r charge/discharge waveform, the determined sample count may be used for measurements made during either portion of the cycle.</p><p>  From Equation 3:</p><p>  tmax = -RmaxCmax?ln(1-(1/2)VCC/V

41、CC)</p><p>  = -(Rnom+1%)(Cnom+5%)ln(1/2)</p><p>  = -(1.01)(267?103)(1.05)(2?10-9)ln(1/2)</p><p><b>  =393 s.</b></p><p>  The minimum number of samples fo

42、r half the cycle is:</p><p>  tmax/ t = (393?10-6)/(5?10-6) = 79</p><p>  To maximize accuracy, voltages from zero to VCC/2 are measured during the charge portion of the capacitor charge/dischar

43、ge cycle and voltages from VCC to VCC/2 are measured during the discharge portion of the cycle. As a result, the total number of entries in the table is twice the number of samples calculated previously for each half cyc

44、le. The lookup table contains application-specific values corresponding to the calculated voltage at each sample. For each half cycle, the Nth entry in the tabl</p><p>  VC=VCC?e-t/RC

45、 (3) </p><p>  The size and contents of the table may vary from application to application depending on the sample interval an

46、d conversion resolution. As the resolution increases, the number of entries in the table grows.</p><p>  In the voltmeter application, with resolution equal to 0.05 Volt, the lookup table contains 158 entrie

47、s, which is twice the number of samples per half cycle calculated above.</p><p>  Voltages corresponding to samples taken during the charge half cycle are calculated by replacing ’t’ with ’N ?t’ in Equation

48、1, where N represents the sample number (0-78). By setting ?t equal to the sample interval of 5 microseconds, R to 267 kilohms, C to 2 nanofarads, and VCC to 5.00-volts, Equation 1 becomes:</p><p>  V = 5(1-

49、e-N (.0093633))</p><p>  Voltages corresponding to samples taken during the discharge half cycle are calculated by replacing ’t’ with ’N ?t’ in Equation 4, where N represents the sample number (0-78). Using

50、the same values as for the charge half cycle, Equation 4 becomes:</p><p>  V = 5?e-N(.0093633))</p><p>  An abbreviated list of the voltages calculated for the capacitor charge/discharge cycle i

51、s shown below. The ordering of the voltages, increasing in the first half, decreasing in the second, tracks the voltage on the capacitor and defines the ordering of the table entries.</p><p>  As shown by th

52、e list, the number of samples in each half cycle is greater than required to reach the midrange value of 2.500-volts. This allows for “fast” cycles which overshoot the nominal midrange value before the last sample is tak

53、en in each half cycle. Note that the difference between the calculated voltages at samples N=0 and N=1 is within the desired resolution of 0.050-volt, but the difference in voltage between adjacent samples decreases as N

54、 increases. This reflects the non-linear relat</p><p>  The calculated voltages shown in the list are not entered into the lookup table, but are used to determine the values of the table entries. In the volt

55、meter application, the calculated voltages are rounded to tenths of a volt and the result stored in the table in packed-BCD form, two digits per byte. Example: the table entry corresponding to 2.523-volts is 25 hex, whic

56、h displays as 2.5-volts.</p><p>  The worst case conversion error may be further reduced by utilizing components with tighter tolerances. Conversion accuracy and linearity are also affected by the characteri

57、stics of the capacitor. The capacitor used in the voltmeter prototype is a polystyrene film type, which not only provides good accuracy, but analog-to-digital conversion method. Even using minimizes error due to dielectr

58、ic absorption and other effects.</p><p>  Error sources which have not been examined include: comparator limitations; asymmetries between the charge and discharge portions of the cycle; failure of the voltag

59、e on the capacitor to reach ground or VCC; variations in VCC. The contributions to conversion error made by these sources can be expected to increase error to somewhat more than the value due to component tolerances alo.

60、</p><p><b>  中文翻譯:</b></p><p>  AT89CX051微控制器的模擬-數(shù)字變換器應用</p><p>  Atmel AT89C1051和AT89C2051微控制器是具有低引腳數(shù)和寬工作電壓范圍的單片閃光器(Flash)和不可缺少的比較器。這篇應用手冊描述了這兩種低成本的數(shù)字化變換技術。它們被用于Atmel A

61、T89C1051和AT89C2051微控制器的比較器中。</p><p>  RC 模擬數(shù)字變換器</p><p>  這種變換方法組成簡單,但準確性下降和變換時間長。在下列提到的例子中分辨率超過50毫伏,準確性低于0.1volt或是更少。變換時間為7毫秒或是更少。</p><p>  如圖一所示,如果采用RC模擬數(shù)字轉換方法只需要一個AT89CX051微控制器,兩

62、個電阻器和一個電容器。微控制器的輸出(11腳)大約從零和VCC間變化。它交替為電容充放電。這個電容器與內部比較器的非反向輸入相連(12腳)。微控制器計算電容器電壓達到與內部變換比較器輸入電壓的時間。比較器電壓要和未知輸入電壓相匹配(13腳)。未知電壓是所測時間的函數(shù)。</p><p>  HP5082-7300 LED 所顯示不需要變化,但是要用軟件來實現(xiàn)簡單二進制電壓作用。模數(shù)變換器在兩個顯示屏上顯示伏特和0.

63、1伏特。電壓分辨率不利用RC轉換軟件的判別,它在提供調試工具的同時也給出了一個方法。</p><p>  典型電容器充放電周期波形如圖二所示。放電部分曲線和充電部分曲線相同,大約都在VC=VCC=2線上。除了已給出的說明的地方,放電部分周期運用了下面的方程和討論:</p><p>  下列指數(shù)方程中,電容器的電壓是時間的函數(shù):</p><p>  其中VC是t時刻的

64、電容器電壓,VCC是給定電壓,RC是電容器和電阻器值的乘積。電壓單位為伏,時間單位為秒。電阻為歐姆,電容為法拉。乘積RC為時間恒量,影響網(wǎng)絡的波形。當電容器充放電開始時波形最陡,并隨時間變化。不能用浮點計算和超函數(shù)來求解指數(shù)方程是RC變換方法的首要問題。在一個壓縮的時間范圍里,指數(shù)曲線呈現(xiàn)遠遠超出其寬度的陡升趨勢,近似為垂線。曲線在橫向的持續(xù)變化超過了橫向變化,產生了很大的誤差。是這種方法失敗的原因。而且它不能解決曲線在漸近線VCC附近

65、劇烈震動的問題。如果每一次取樣時間間隔里使用查表繪出計算初值,微型控制器不需要適時解決指數(shù)方程。這種方法在簡化變換軟件時,可以根據(jù)應用需要把數(shù)據(jù)編碼和格式化??赡苁箶?shù)據(jù)對稱以減小表的大小。</p><p>  RC轉換方法的第二個問題是方程各項值變化引起的固有誤差。圖三是電阻電容積值的變化導致電壓變化的放大圖。如圖所示,隨著電容電阻乘積中電壓減小,電容電壓隨之減小。</p><p>  電

66、容器充放電周期的對稱減小了電容電阻乘積值變化帶來的影響,提高了變換準確性。這是通過周期充電部分的計算電壓小于VCC/2而放電部分的計算電壓大于VCC/2。誤差在VCC/2達到最小</p><p>  在RC被賦值之前,比較器輸出采樣時間間隔必須確定。采樣間隔應盡可能小以縮短變換時間和增大變換分辨率。采樣間隔受執(zhí)行必要編碼所需時間限制。編碼時間由微控制器的時鐘速度決定。在伏特計應用中,由于微控制器在12MHZ時鐘下

67、運行,每五微秒為一個采樣間隔。</p><p>  時間恒量RC影響著電容器充放電的波形。時間恒量必須選擇合適的值以使波形最陡部分達到所需的分辨水平。充電部分的波形最陡出現(xiàn)在原點附近,而放電部分則出現(xiàn)在VCC附近。由于波形的對稱,兩個部分的波形可能用同一時間恒量來計算。</p><p>  計算時是變換器達到所需分辨率的所需電壓。是先前所定的采樣間隔。曲線坐標VC表示電容電壓,在曲線中呈直

68、線。在圖中,由于采樣在電壓間隔中心進行,所以曲線的斜面是理想的。實際可能要小一些。也有可能大。或者分辨率會減小。將采樣時間間隔從原點偏移1/2t以后,其中心點對應第一次電壓間隔采樣點。</p><p>  為了求得第一次采樣所需斜面,要獲得時間恒量的最小值,解方程一得RC</p><p>  然后設為所需分辨率得最小值(0.05volt),時間為先前確定的采樣間隔(5毫秒)。在第一個采樣點

69、=1/2計算RC。其中VC=1/2,t=1/2</p><p>  R和C的乘積不能小于計算出的時間恒量最小值。</p><p>  用帶1%公差電阻和5%公差的電容:(Rnorm-1%)(Cnorm-5%)>4.99*10-4</p><p>  在伏特計中,R和C的值選擇分別為267歐姆和2毫微法。得到一個最小時間恒量大約5.02*10-4</p&g

70、t;<p>  另外一個約束條件是R的值。再提到圖一,5.1歐上拉電阻連接微控制器的11腳。這個電阻是微控制器內部上拉。但是在電容器充放電周期的充電過程中對網(wǎng)絡RC的時間恒量有決定性影響。它產生不對稱的充放電波。能造成變換誤差。為減小電容器充放電通道差異的影響,R的值應選得比上拉內阻值大得多。在伏特計應用中,R的值選擇為267歐姆,此值遠遠大于上拉內阻。</p><p>  時間恒量(RC)決定了電

71、容器充放電周期的持續(xù)時間。它是所需變換分辨率的函數(shù)。電容器充放電所需時間越多,在計算周期所需的采樣量越多,查找表個數(shù)越多。</p><p>  電容器充放電所需的時間通過計算電容電壓從漸近線上升到最小可晰電壓間隔一半所需的時間來近似得到。波形的充電部分,漸近線在VCC。由于波形的對稱,定值同時用在周期充電和放電部分。解方程1得到時間:</p><p>  若VCC =0.5,所需電壓為:V

72、C=VCC-(1/2)(0.05)=VCC-0.025</p><p>  所需測量回路采樣最小值通過計算電容器電壓達到VCC/2得到,根據(jù)不同采樣間隔劃分。如果電容電壓上升緩慢,而電容電阻值很大,時間常數(shù)用最大值計算。由于電容器充放電波形的對稱,采樣數(shù)將同時在周期的兩個部分代入計算。</p><p>  半周期最大采樣周期為:</p><p>  為了提高準確性,

73、在周期充電部分電壓計算從0到VCC/2,而放電部分從VCC到1/2VCC。在表中總個數(shù)是先前每半周期計算采樣數(shù)的二倍。</p><p>  查表包含軟件專門值。它和每次采樣計算電壓值相對應。對每半個周期,平臺第N個值對應t=(N-1)時的電壓。是先前確定的采樣間隔。對充電半周期,通過求解方程一得到電容器開始充電起消耗時間,來求得每次采樣的電壓。對放電半周期,通過求解下列方程得到電容器開始放電起消耗時間,求得每次采

74、樣電壓。</p><p>  放電半周期采樣對應電壓通過在方程4中用N代替t計算。其中N表示采樣數(shù),在充電半周期中也用同一個值。方程4變成:V=5e-N(.0093633)</p><p>  電壓在前半周期中上升,在后半周期中下降。它變化軌跡決定了表數(shù)的排列。如表所示,每半周期的采樣數(shù)大于所需中等大小值2.500v。它可以在每次半周期最后采樣前實現(xiàn)比一般中間值更快的周期。在所需分辨率0.

75、050v。記下N=0,N=1時采樣計算電壓的差值。但是臨近采樣的電壓隨著N的遞增而下降。在一個周期中。電壓和時間表現(xiàn)非線性關系。</p><p>  表中所列計算電壓沒有加入查找表。但用來確定表數(shù)。在伏特計應用中,計算電壓在0.1伏周圍,結果儲存在PACDED-BCD式的表中,兩個數(shù)字一比特。</p><p>  最差的變換誤差可以通過用較小公差元件來進一步減小。變換準確性和線性受電容器特

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經(jīng)權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
  • 5. 眾賞文庫僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
  • 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論