A/D convertor AD7715 with BS2
Archiver
Posts: 46,084
I am tring to read a AD7715 with a BS2 and I get all kind of weird
numbers .Please somebody help me [noparse]:([/noparse]
numbers .Please somebody help me [noparse]:([/noparse]
Comments
ADdata VAR Word 'variable to hold 16 bit AD result.
SCLK CON 7 'clock to AD pin number.
DATAIN CON 8 'AD data input pin number.
DATAout CON 9 'AD data output pin number.
RDY CON 10 'RDY input pin number.
Code for initiating
SHIFTOUT DATAin,SCLK,MSBFIRST,[noparse][[/noparse]$FFFF\16,$FFFF\16] 'reset the AD7730 after
power up.
SHIFTOUT DATAin,SCLK,MSBFIRST,[noparse][[/noparse]$XX] 'write to a
register.
.
.
.
LOW X 'set DIN line low to ensure part is not reset
'while in continuous read mode.
Code for reading data
waitRDY:
IF RDY = 1 THEN waitRDY 'wait for RDY to go low to indicate
output update.
SHIFTIN DATAout,SCLK,MSBPOST,[noparse][[/noparse]ADdata\16] 'read result from data
register.
I hope this help
Regards
Mohamed Refky
>From: "marin_ene" <marin_ene@y...>
>Reply-To: basicstamps@yahoogroups.com
>To: basicstamps@yahoogroups.com
>Subject: [noparse][[/noparse]basicstamps] A/D convertor AD7715 with BS2
>Date: Thu, 11 Mar 2004 00:13:13 -0000
>
>I am tring to read a AD7715 with a BS2 and I get all kind of weird
>numbers .Please somebody help me [noparse]:([/noparse]
>
>
>
>
>To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
>from the same email address that you subscribed. Text in the Subject and
>Body of the message will be ignored.
>
>Yahoo! Groups Links
>
>
>
>
>
_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963