Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

problem using AD7711A, a 24 bit analog to digital converter

Status
Not open for further replies.

Nicolina2

Newbie level 2
Joined
Mar 31, 2005
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,314
Hi!
Somebody have experience using AD7711A, a 24 bit analog to digital converter?
I have a problem somewhere, because I can't see the right data on a LCD display... the good value is just in flashing at 2 - 3 second on LCD display ... in the rest, the measured value of analogic signal is 0.

The AD7711A is conected at a AT89C2051 microcontroller, and this one display data on a LCD with 2 lines, compatible with HD44780 standard

In infinite while loop I have:

while(1)
{

write_to_ADC(0xA097D0); // initialization code, mean Activate BAckground Calibration, gain 1, chanel 0, Unipolar, and the number at Filter Selection is 2000

if(flag_received_data24 == 1)
{
display_no(curent_data24);
flag_received_data24 = 0;
EX0 = 1; // enable int0
}
}

the external interrupt 0 is:

void int_ext_0(void) interrupt 0
{
EX0 = 0; // invalidarea intreruperii externe 0
curent_data24 = read_from_ADC();
flag_received_data24 = 1;
}

and the reading and writing to AD7711A functions are:


void write_to_ADC(unsigned long int data24)
{
long int compara,numarat;
TFS = 1; RFS = 1; SCLK = 0;
TFS = 0;

compara = ((unsigned long)1)<<23;
for (numarat=compara;numarat>0;numarat>>=1)
{
if((data24 & numarat)==0) SDATA = 0;
else SDATA = 1;

SCLK = 1;
SCLK = 0;
}
TFS = 1;
}

unsigned long int read_from_ADC(void)
{
unsigned char i;
unsigned long int data24;
data24 = 0;
TFS = 1; RFS = 1; SCLK = 0;
RFS = 0;
for(i=0;i<24;i++)
{
SCLK = 1;
data24 = data24 | SDATA;

SCLK = 0;

data24<<=1;
}
RFS = 1;
data24>>=1;
return data24;
}

I put on attachment the a jpeg with the schematic... but if you want to help me,
I can send you the full source code, just write me at hai@k.ro

I am in the situation: all is perfect but is not working...
PLEASE HELP ME! :cry:

Stelian
 

Re: problem using AD7711A, a 24 bit analog to digital conver

Could be that you have one of the "famous" 8051 problems that a PORT can be used as input or output :)

In your read_from_ADC function set SDATA=1 somewhere in the beginning otherwise you just might read 0 if the last bit written to SDATA using write_to_ADC was 0 ...

I also moved this thread to the Microcontrollers section.

hope this helps and best regards
 

    Nicolina2

    Points: 2
    Helpful Answer Positive Rating
Re: problem using AD7711A, a 24 bit analog to digital conver

THANK YOU VERY MUCH C-Man !

This was the solution!
I just put a SDATA = 1; on the begining of reading function...and ALL is working.

I am feel like indebted by you, because I had a pain to fix the problem
for 2 days... and in this morning... after a half of hour from posting my message
on list, I got the solution!

I am looking now on the LCD display... and I not belive that is working... 8O


Thank you! again... :lol: and.. if I can help you with something... don't hesitate to ask! :wink:
 

Re: problem using AD7711A, a 24 bit analog to digital conver

Glad to hear that it is working now :)

Just one note to you (and others) there is a "that helped" button in each thread that only the starter of the thread can see. Whenever you get a helpful answer press this button and you will donate 3 points to the helpful person.

Also note that the points are not subtracted from your account ...

best regards
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top