Tony Kübek, [tony.kubek at flintab.com] of Flintab AB says:
;*************** AnalogDevices AD7730 ******************* ; for writing to registers #define SELECT_WR_COMM 0x00 ; base adress for communication register #define SELECT_WR_MODE 0x02 ; select mode reg write #define SELECT_WR_FILTER 0x03 ; select filter reg write #define SELECT_WR_DAC 0x04 ; select dac reg write #define SELECT_WR_OFFSET 0x05 ; select offset reg write #define SELECT_WR_GAIN 0x06 ; select gain reg write ; for reading registers #define SELECT_RD_STATUS 0x10 ; read status reg once #define SELECT_RD_STATUS_CNT 0x20 ; continous read status cycle #define SELECT_RD_STATUS_END 0x30 ; returns to one write/read cycle #define SELECT_RD_DATA 0x11 ; read data reg once #define SELECT_RD_DATA_CNT 0x21 ; continuos read data cycle #define SELECT_RD_DATA_END 0x30 ; returns to one write/read cycle #define SELECT_RD_MODE 0x12 ; read mode reg once #define SELECT_RD_MODE_CNT 0x22 ; continous read mode cycle #define SELECT_RD_MODE_END 0x30 ; return to one write/read cycle #define SELECT_RD_FILTER 0x13 ; read filter reg #define SELECT_RD_DAC 0x14 ; read dac reg #define SELECT_RD_OFFSET 0x15 ; read offset reg #define SELECT_RD_GAIN 0x16 ; read gain regI use an pseudo SPI routine called AD_SEND_BYTE thats sends the byte in W to the AD7730 AND returns with the ( eventual ) byte from the AD in W. To read DATA reg:
MOVLW SELECT_RD_DATA CALL AD_SEND_BYTE ; send request MOVLW 0x00 ; dummy byte CALL AD_SEND_BYTE ; get top byte MOVWF AD_NewValue ; store it MOVLW 0x00 ; dummy byte CALL AD_SEND_BYTE ; MOVWF AD_NewValue+1 ; store it MOVLW 0x00 ; dummy byte CALL AD_SEND_BYTE ; MOVWF AD_NewValue+2 ; store itOr to read status byte from AD:
; read AD status reg MOVLW SELECT_RD_STATUS CALL AD_SEND_BYTE ; send request MOVLW 0x00 ; dummy byte PCALL AD_SEND_BYTE ; get byte MOVWF AD_Status
Interested:
Questions:
May you explain me how i have to connect them ? can you change the values in the registers using a keyboard?How do you change them?Do you change the program every time you want to test a new value? Thanks in advanced...
Can you change the value of the register using a keyboard? And display the results on a LCD? May you select 16 or 24 bits? I´m interesting on it. May you send me more information please. Tkanks in advanced... I´m very interesting on it.
Questions:
See
See:
file: /Techref/microchip/spi-ad7730-tk.htm, 7KB, , updated: 2006/11/2 05:22, local time: 2024/12/22 09:15,
owner: TK-FLINTAB-DA9,
3.21.46.129:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://massmind.ecomorder.com/Techref/microchip/spi-ad7730-tk.htm"> PIC Microcontoller Input / Ouput Method SPI interface to AD7730 </A> |
Did you find what you needed? |
Welcome to ecomorder.com! |
Welcome to massmind.ecomorder.com! |
.