AD7190的小總結

来源:http://www.cnblogs.com/zhanghui822/archive/2016/09/22/5897499.html
-Advertisement-
Play Games

1、單次轉換模式 通過配置“模式寄存器的MD2、MD1、MD0為001”,便可啟動單次轉換。 流程“上電 -》 單次轉換 -》 省電模式 ” , 片內振蕩上電需要大約1ms。 單次轉換的時序圖: 數字的含義:0x08 :表示後面的數字是用來設置mode register的; 0x280060:用來設 ...


1、單次轉換模式 通過配置“模式寄存器的MD2、MD1、MD0為001”,便可啟動單次轉換。 流程“上電 -》 單次轉換 -》 省電模式 ” , 片內振蕩上電需要大約1ms。   單次轉換的時序圖:   數字的含義:0x08 :表示後面的數字是用來設置mode register的; 0x280060:用來設置單次轉換的參數;       0x58:讀數據寄存器;      DATA:就是ADC對應通道採集的值。   完成轉換後,DOUT/RDY變成低電平。從數據寄存器中讀取數據字後,DOUT/RDY變為高電平。如果CS為低電平,DOUT/RDY將保持高電平,直到又啟動並完成一次轉換為止。如果需要,即使DOUT/RDY已變為高電平,也可以多次讀取數據寄存器。     2、多通道的單次轉換 如果使能了多個通道,ADC將依次選擇各使能通道,併在該通道上執行轉換。轉換啟動後,DOUT/RDY變為高電平並保持該狀態,直到有有效結果可用為止。轉換結果一旦可用,DOUT/RDY便會變成低電平。然後ADC選擇下一個通道並開始轉換。在執行下一個轉換過程中,用戶可以讀取當前的轉換結果。下一轉換一旦完成,數據寄存器便會更新。用戶讀取轉換結果時間是有限的。ADC在各選擇通道上均完成一次轉換後,便會返回省電模式。   如果模式寄存器的DAT_STA位設置為1 ,則每次執行數據讀取時,狀態寄存器的內容將與轉換結果一同輸出。狀態寄存器的四個LSB指示轉換對應的通道。   3、連續轉換模式       連續轉換模式是上電預設模式。 AD7190連續轉換,每次轉換完成時,狀態機寄存器中的RDY位變為低電平。如果CS為低電平,則當一次轉換完成時,DOUT/RDY將變為低電平。 若要讀取轉換結果,用戶需要寫入通信寄存器,指示下一操作為讀取數據寄存器。從數據寄存器中讀取數據字後,DOUT/RDY將變為高電平。如需要,用戶可以多次讀取該寄存器。但是,用戶必須確保在下一次轉換完成時,對數據寄存器的訪問已經結束,否則新轉換字將丟失。   如果使能了多個通道,ADC將連續迴圈選擇各使能通道,每次迴圈均會在每個通道上執行一次轉換。一旦獲得轉換結果,就會立即更新數據寄存器。每次轉換結果可用時,DOUT/RDY將變為低電平。然後,用戶可以讀取轉換結果,同時ADC在下一個使能通道上執行轉換。 如果模式寄存器的DAT_STA位設置為1 ,則每次執行數據讀取時,狀態寄存器的內容將與轉換結果一同輸出。狀態寄存器的四個LSB指示轉換對應的通道。     4、連續讀取 可以對AD7190記性配置,使得每次轉換完成時,轉換結果會自動置於DOUT/RDY線上,而無需每次寫入通信寄存器以訪問數據。 將0x5C(01011100)寫入通信寄存器後,用戶只需要提供適當的SCLK周期數,這樣當轉換完成時,轉換字便會自動置於DOUT/RDY線路上。ADC應配置為連續轉換模式。 若要退出連續讀取模式,必須在RDY引腳為低電平時將指令0x58(01011000)寫入通信寄存器。在連續讀取模式下,ADC會監控DIN線路上的活動,以便能接收到指令以後以退出連續讀取模式。 此外,如果DIN上出現40個連續1,ADC將複位。因此在連續讀取模式下,DIN應保持低電平,直到有指令要寫入器件。   如果使能了多個通道,ADC將連續依次選擇各使能通道,併在所選擇通道上執行一次轉換。當一個轉換結果可用時,DOUT/RDY便會變為低電平。當用戶施加足夠多的SCLK脈衝時,數據便會自動置於DOUT/RDY引腳上。 如果模式寄存器的DAT_STA位設置為1 ,則每次執行數據讀取時,狀態寄存器的內容將與轉換結果一同輸出。狀態寄存器的四個LSB指示轉換對應的通道。  
類型 濾波類型 建立時間 轉換時間
禁止斬波 sinc3 Tsettle = 3/Fadc Fadc = Fclk/(1024 * FS[9:0])
sinc4 Tsettle = 4/Fadc
使能斬波 sinc3 Tsettle = 2/Fadc Fadc = Fclk/(3*1024 * FS[9:0])
sinc4 Fadc = Fclk/(4*1024 * FS[9:0])
      5、P0 P1 P2 P3腳的作用 AD7190 通過外界多路復用器(如:4選1,8選1)在選擇AD7190採集哪個通道。    6、關於AD7190採集通道的幾點問答 1、What is the sequence of events when switching between channels for the AD719x when the sequencer is disabled and continuous conversion mode is selected? (對於AD719x來說,當序列不是使能時,並且選擇了連續轉換模式,如何切換通道?) 轉換器開頭寫入通信寄存器的每個序列的事件將會指定下一個操作。 例如使用 AD7190/AD7192,通道切換操作的順序如下是 (通道 AIN1_AIN2 和 AIN3_AIN4 )。 進行通道切換的條件是:兩個通道的工作條件都是 50 赫茲輸出數據速率;內部的主時鐘;增益 = 1;緩衝區對雙極模式;應用 REFIN1(+) 和 REFIN1(–) 之間的外部引用是 ADC 的參考源;AD719x 是 24 位部分。 每個序列的事件與此轉換器開頭寫入通信寄存器來指定要執行下一個操作。完成指定的操作時,界面預設為等待下一個指令。 1、Write 0x8 to communications register:    This specifies that the next operation is a write to the mode register. 2、Write 0x080060 to mode register: This configures the AD719x for an output data rate of 50 Hz and the internal clock is used. 3、Write 0x10 to communications register: This specifies that the next operation is a write to the configuration register. 4、Write 0x000110 to configuration register: This configures the AD719x for the above gain, polarity, and reference source and selects Channels AIN1–AIN. 5、Write 0x58 to the communications register: This specifies that the next operation is a write of the data register. 6、Poll DOUT/RDY: Poll the DOUT/RDY pin to determine if valid data is available in the data register. When DOUT/RDY goes low, apply 24 serial clocks to clock the data from the ADC. A read should not be initiated when DOUT/RDY is high. 7、Write 0x10 to communications register: This specifies that the next operation is a write to the configuration register 8、Write 0x000210 to configuration register: This configures the AD719x for the above gain, polarity, and reference source and selects Channels AIN3–AIN4. 9、Write 0x58 to the communications register: This specifies that the next operation is a write of the data register. 10、Poll DOUT/RDY: Poll the DOUT/RDY pin to determine if valid data is available in the data register. When DOUT/RDY goes low, apply 24 serial clocks to clock the data from the ADC. A read should not be initiated when DOUT/RDY is high 11、Continually running through this loop will allow data to be read from each of the channels continuously.         2、What is the sequence of events when converting on several channels for the AD719x when the sequencer is enabled and continuous conversion mode is selected?   When the sequencer is enabled, the ADC automatically sequences through the enabled channels. When several channels are enabled, the bit DAT_STA in the mode register should be set to 1. When DAT_STA equals 1, the contents of the status register are output with each conversion. The LSBs of the status register indicate the channel to which the conversion corresponds. The sequence of events using the AD7190/AD7192, for example, is as follows (Channels AIN1–AIN2 and AIN3–AIN4 being used). The operating conditions for both channels are 50 Hz output data rate, internal master clock, gain = 1, buffer on, bipolar mode; external reference applied between REFIN1(+) and REFIN1(–) is reference source for the ADC. 1、Write 0x8 to communications register: This specifies that the next operation is a write to the mode register. 2、Write 0x180060 to mode register: This configures the AD719x for an output data rate of 50 Hz; the internal clock is used and DAT_STA is set to 1. 3、Write 0x10 to communications register: This specifies that the next operation is a write to the configuration register. 4、Write 0x000310 to configuration register: This configures the AD719x for the above gain, polarity, and reference source and selects Channels AIN1–AIN2 and AIN3–AIN4. 5、Continuously running the following loop allows conversions to be read back from the two channels continuously. 6、Write 0x58 to the communications register: This specifies that the next operation is a write of the data register. 7、Poll DOUT/RDY: Poll the DOUT/RDY pin to determine if valid data is available in the data register. When DOUT/RDY goes low, apply 32 serial clocks to clock the data from the ADC. A read should not be initiated when DOUT/RDY is high   3、What is the sequence of events when switching between channels for the AD719x when the sequencer is enabled and continuous read mode is selected?   When the sequencer is enabled, the ADC automatically sequences through the enabled channels. When several channels are enabled, the bit DAT_STA in the mode register should be set to 1. When DAT_STA equals 1, the contents of the status register are output with each conversion. The LSBs of the status register indicate the channel to which the conversion corresponds. With continuous read mode enabled, the user only needs to apply the SCLK pulses when a conversion is available (RDY goes low)—  a write to the communications register for each read of the data register is not required. The sequence of events using the AD7190/AD7192, for example, is as follows (Channels AIN1–AIN2 and AIN3–AIN4 being used). The operating conditions for both channels are 50 Hz output data rate, internal master clock, gain = 1, buffer on, bipolar mode; external reference applied between REFIN1(+) and REFIN1(–) is reference source for the ADC.   1、Write 0x8 to communications register: This specifies that the next operation is a write to the mode register. 2、Write 0x180060 to mode register: This configures the AD719x for an output data rate of 50 Hz, the internal clock is used and DAT_STA is set to 1. 3、Write 0x10 to communications register: This specifies that the next operation is a write to the configuration register. 4、Write 0x000310 to configuration register: This configures the AD719x for the above gain, polarity, and reference source and selects Channels AIN1–AIN2 and AIN3–AIN4. 5、Write 0x5C to the communications register: This specifies that the serial interface is dedicated to continuously read the data register until this function is disabled. 6、Continuously running the following loop allows conversions to be read back from the two channels continuously. 7、Poll DOUT/RDY: Poll the DOUT/RDY pin to determine if valid data is available in the data register. When DOUT/RDY goes low, apply 32 serial clocks to clock the data from the ADC. A read should not be initiated when DOUT/RDY is high. 8、To disable continuous read mode, the command 0x58 is written to the communications register when is low     4、If a conversion is not read and the next conversion is complete, for how long does DOUT/RDY go high?   The DOUT/RDY pin goes high for approximately 100 µs when the master clock is 4.9 MHz. During this time, the data register is updated with the new conversion data so the user should not attempt to read the data register.   5、When single conversion mode is used, can CS be taken high after the single conversion is initiated?   The serial interface is independent of the sampling process. So, once the single conversion is initiated, the AD719x will power up and perform the single conversion irrespective of the CS polarity. So, the user can take CS low, initiate the single conversion and then take CS high again. When the conversion is complete, CS can be taken low to read the conversion and another single conversion can be started if required.   When CS is taken high, the DOUT/RDY pin is tristated. Therefore, the DOUT/RDY pin will not indicate the end of the conversion. The user can determine the end of the conversion by reading the status register. Alternatively, the conversion time could be timed out by the microcontroller clock.     6、Is the serial interface reset when CS is taken high?   No. CS does not reset the serial interface. To reset the serial interface, 40 1s must be written to the ADC. This will reset the on-chip registers to their default values also.        This architecture was used as it allows the user to read or write to the AD719x in “batches.” For example, when reading the configuration register,the contents can be read as a continuous 24-bit word or the data can be split into three 8-bit bytes. When writing to the configuration register, the information can be sent as a continuous 24-bit word; alternatively, the data can be sent as three 8-bit bytes. CS can be held low when the information is being transferred. Alternatively, CS can be used to frame each of the 8-bit bytes without affecting the data transfer process.   7、When information (conversion data or information from the on-chip registers) is read from the ADC, the LSB readback is always 1. Why? The DOUT and RDY functions share a pin on the AD719x. So, the DOUT/RDY pin functions are a ready pin when CS is low. Every time a conversion is completed, the pin goes low, indicating to the microprocessor that a valid conversion is available. When the user requests a read of the data register, the DOUT/RDY pin functions are a DOUT pin. When pulses are applied to the SCLK pin, the data is placed on the DOUT pin. The data is output from the AD719x following the SCLK falling edge and is valid on the SCLK rising edge. When the LSB of the data is placed on the DOUT/RDY pin, the DOUT/RDY pin changes its functionality so that it operates as a RDY pin. The change from the DOUT to RDY the function occurs a few nanoseconds after the SCLK rising edge. The microprocessor is latching the bits on the SCLK rising edge. So, if the microprocessor is slow, then the DOUT/RDY pin is functioning as a RDY pin when the LSB is latched into the microprocessor. So, the microprocessor reads the value of the RDY pin rather than the LSB, causing the LSB to be a 1. To prevent this, a faster microprocessor must be used. Alternatively, general-purpose input/output pins of the microprocessor can be used to represent a serial interface. By bit-banging, the user has more control over the read instant. By reading the values on the DOUT pin when SCLK is low rather than latching in the data on the SCLK rising edge, all bits of the data read will be valid。  
您的分享是我們最大的動力!

-Advertisement-
Play Games
更多相關文章
  • 認識資料庫備份和事務日誌備份 資料庫備份與日誌備份是資料庫維護的日常工作,備份的目的是在於當資料庫出現故障或者遭到破壞時可以根據備份的資料庫及事務日誌文件還原到最近的時間點將損失降到最低點。 資料庫備份 資料庫備份可以手動備份和語句備份 一.手動備份資料庫 1.滑鼠右鍵選擇你要進行備份的資料庫-任務 ...
  • 存儲過程: 因為語句被編譯過,所以特別適合用來執行,查詢、存儲等常用指令,比如文章發佈、文章刪除、會員註冊、會員登錄等常用query我們都可以建立存儲過程。 視圖: 通過視圖,我們可以很方便把幾個表查詢的結果串在一個虛擬表,方便我們查詢,而不需要每次都寫多表查詢的語句。與此同時,虛擬表的字我們都可以 ...
  • 數據類型: --類似於C#中的數據類型 Datetime 範圍是:1753.1.1—— 9999.12.31 Smalldatetime 1900.1.1 ——2079.6.6 操作: 1.查找資料庫的主文件和日誌文件所在位置: 右擊資料庫,點擊屬性,會出現下圖: 可以看出,此資料庫擁有一個主文件( ...
  • 資料庫: 結構化查詢語言(Structured Query Language)簡稱SQL; 資料庫管理系統(Database Management System)簡稱DBMS; 資料庫管理員(Database Administration)簡稱DBA,功能是確保DBMS的正常高效運行; 資料庫分體驗 ...
  • 圖解安裝 PostgreSQL 【博主】反骨仔 【原文地址】http://www.cnblogs.com/liqingwen/p/5894462.html 序 園友的一篇《Asp.Net Core 項目實戰之許可權管理系統(3) 通過EntityFramework Core使用PostgreSQL》需 ...
  • 之前是Windows 10版本1607版本14393.102升級14393.187過後,突然出現不能撥公司防火牆的L2TPVPN了。 網上眾說紛紜,原來遇到這個問題的人真不少,不過我是第一次遇到。結合網上一些分析過後,我電腦的解決方式是: 錯誤描述:當連接VPN是回傳錯誤為“ L2TP連接嘗試失敗, ...
  • GPIO 即通用輸入輸出口。凡事都要熟悉,熟能生巧。一定要掌握MDK軟體的工程操作方法。 對於GPIO的操作。 Project裡面要有以下幾個文件夾(開發之前需要包含相應的庫文件,這裡預設已經包含) STEP BY STEP(以按鍵和LED燈為例): 1.在USER文件夾里新建對應功能的C文件和H文 ...
  • 今天將mac os升級到了10.12,但是第一次關機就一直停著不動,只能強制關機(按電源鍵). 在網上查了下,這是mysql的一個bug. 進入到系統偏好設置中,點擊MySql,取消Automatically start mysql server on startup. ...
一周排行
    -Advertisement-
    Play Games
  • 移動開發(一):使用.NET MAUI開發第一個安卓APP 對於工作多年的C#程式員來說,近來想嘗試開發一款安卓APP,考慮了很久最終選擇使用.NET MAUI這個微軟官方的框架來嘗試體驗開發安卓APP,畢竟是使用Visual Studio開發工具,使用起來也比較的順手,結合微軟官方的教程進行了安卓 ...
  • 前言 QuestPDF 是一個開源 .NET 庫,用於生成 PDF 文檔。使用了C# Fluent API方式可簡化開發、減少錯誤並提高工作效率。利用它可以輕鬆生成 PDF 報告、發票、導出文件等。 項目介紹 QuestPDF 是一個革命性的開源 .NET 庫,它徹底改變了我們生成 PDF 文檔的方 ...
  • 項目地址 項目後端地址: https://github.com/ZyPLJ/ZYTteeHole 項目前端頁面地址: ZyPLJ/TreeHoleVue (github.com) https://github.com/ZyPLJ/TreeHoleVue 目前項目測試訪問地址: http://tree ...
  • 話不多說,直接開乾 一.下載 1.官方鏈接下載: https://www.microsoft.com/zh-cn/sql-server/sql-server-downloads 2.在下載目錄中找到下麵這個小的安裝包 SQL2022-SSEI-Dev.exe,運行開始下載SQL server; 二. ...
  • 前言 隨著物聯網(IoT)技術的迅猛發展,MQTT(消息隊列遙測傳輸)協議憑藉其輕量級和高效性,已成為眾多物聯網應用的首選通信標準。 MQTTnet 作為一個高性能的 .NET 開源庫,為 .NET 平臺上的 MQTT 客戶端與伺服器開發提供了強大的支持。 本文將全面介紹 MQTTnet 的核心功能 ...
  • Serilog支持多種接收器用於日誌存儲,增強器用於添加屬性,LogContext管理動態屬性,支持多種輸出格式包括純文本、JSON及ExpressionTemplate。還提供了自定義格式化選項,適用於不同需求。 ...
  • 目錄簡介獲取 HTML 文檔解析 HTML 文檔測試參考文章 簡介 動態內容網站使用 JavaScript 腳本動態檢索和渲染數據,爬取信息時需要模擬瀏覽器行為,否則獲取到的源碼基本是空的。 本文使用的爬取步驟如下: 使用 Selenium 獲取渲染後的 HTML 文檔 使用 HtmlAgility ...
  • 1.前言 什麼是熱更新 游戲或者軟體更新時,無需重新下載客戶端進行安裝,而是在應用程式啟動的情況下,在內部進行資源或者代碼更新 Unity目前常用熱更新解決方案 HybridCLR,Xlua,ILRuntime等 Unity目前常用資源管理解決方案 AssetBundles,Addressable, ...
  • 本文章主要是在C# ASP.NET Core Web API框架實現向手機發送驗證碼簡訊功能。這裡我選擇是一個互億無線簡訊驗證碼平臺,其實像阿裡雲,騰訊雲上面也可以。 首先我們先去 互億無線 https://www.ihuyi.com/api/sms.html 去註冊一個賬號 註冊完成賬號後,它會送 ...
  • 通過以下方式可以高效,並保證數據同步的可靠性 1.API設計 使用RESTful設計,確保API端點明確,並使用適當的HTTP方法(如POST用於創建,PUT用於更新)。 設計清晰的請求和響應模型,以確保客戶端能夠理解預期格式。 2.數據驗證 在伺服器端進行嚴格的數據驗證,確保接收到的數據符合預期格 ...