EmbeddedRelated.com
Forums

interfacing ADS7825 with lpc2148 blueboard

Started by shweta July 31, 2010
hi, capiman,
sorry my english is not good.
when i am giving 5Volt analog input.Digital data is come out from
ADS7825.Also data is come from ADS to blueboard pin.But when i am taking
data from that pin ,and display into LCD and uart1 .Only 0Volt is coming.

when i am vary analog input it will also display 0Volt.
so what should i do?
thanks

On Mon, Aug 2, 2010 at 1:09 PM, capiman26061973 wrote:

> Hello Shweta,
> > if you are knowing about ADS7825 then reply me
>
> > > > Digital data is not come into uart1.
>
> you wrote: "into uart1" - Interesting approach...
> Have you correctly connected ADS7825 via UART1 ?
> Are you sure you used UART1 and not any other interface ?
> Which signals of ADS7825 have you connected to which signal
> of UART1 ? Can you post the schematic of this project ?
> Which baudrate and setting have you used to communicate with ADS7825 ?
>
> Why don't you use the lpc2148 internal AD converter ?
>
> How have you split the project ? What are others doing ?
>
> Best regards,
>
> Martin
>
>
>

An Engineer's Guide to the LPC2100 Series

i attach schematic in previous posts and also pin number of connection.
baud rate is 9600

On Mon, Aug 2, 2010 at 1:32 PM, Shweta Parmar wrote:

> hi, capiman,
> sorry my english is not good.
> when i am giving 5Volt analog input.Digital data is come out from
> ADS7825.Also data is come from ADS to blueboard pin.But when i am taking
> data from that pin ,and display into LCD and uart1 .Only 0Volt is coming.
>
> when i am vary analog input it will also display 0Volt.
> so what should i do?
> thanks
> On Mon, Aug 2, 2010 at 1:09 PM, capiman26061973 wrote:
>
>> Hello Shweta,
>> > if you are knowing about ADS7825 then reply me
>>
>> > > > Digital data is not come into uart1.
>>
>> you wrote: "into uart1" - Interesting approach...
>> Have you correctly connected ADS7825 via UART1 ?
>> Are you sure you used UART1 and not any other interface ?
>> Which signals of ADS7825 have you connected to which signal
>> of UART1 ? Can you post the schematic of this project ?
>> Which baudrate and setting have you used to communicate with ADS7825 ?
>>
>> Why don't you use the lpc2148 internal AD converter ?
>>
>> How have you split the project ? What are others doing ?
>>
>> Best regards,
>>
>> Martin
>>
>>
>>
On Monday 02 August 2010 12:33:09 Shweta Parmar wrote:
> that i will not tell you.
> & what is the my question?
> if you are knowing about ADS7825 then reply me
HAHA. I hope you get it. But just incase you did not:
You no tell then I no tell and most likely nobody else tell.

There are plenty of pros on this list who will be willing to help
subject to you getting an education and doing your homework or paying
them a fee. Even if they dont know a thing about ADS7825, they would
have sufficient experience with multi channel. high res A/D
converters, to do whatever it is you want them to do.
Further mucking around with 16 bit converters involves complex analog
issues. So stupid statements like "data is not coming", "data is not
going", "lcd is showing zero" indicates incompetence and laziness
beyond help. Looking thru your posts, I am convinced about both.

So if you want some help, take the trouble to
1) describe your project in sufficient detail
2) Post the steps you took to isolate the problem and the results
3) Post a Schematic, particularly of problem areas
4) post code parts that you think are a problem.
5) And stop whining (for those interested, Rona-dhona, is a coloquial
Hindi term for whining)

I really pity the company and it's PHBs.

--
Rgds
JTD
1. Check if you are getting output from ADS7825. If you are using parallel interface, you could check using logic analysers. If serial interface, then make sure you are getting the reqd output there.

2. If all this is fine, check the register where you are storing your final information, ie converted data from ADS7825. Make sure these values  first match with your input values. This can be relatively easy using a JTAG

3. Assuming that your UART program is not a problem. It should be relatively simple to move the data from the register to UART.

You need to check it stepwise, just saying that you are not getting the output when you give the input is waste of your and others time. There might be n number of issues that might be causing this problem. You need to clear about your problem statement.

--- On Mon, 2/8/10, Shweta Parmar wrote:

From: Shweta Parmar
Subject: Re: [lpc2000] Re: interfacing ADS7825 with lpc2148 blueboard
To: l...
Date: Monday, 2 August, 2010, 8:04 AM

 

i attach schematic in previous posts and also pin number of connection.
baud rate is 9600

On Mon, Aug 2, 2010 at 1:32 PM, Shweta Parmar wrote:

hi, capiman,
sorry my english is not good.
 when i  am giving 5Volt analog input.Digital data is come out from ADS7825.Also data is come from ADS to blueboard pin.But when i am taking data from that pin ,and display into LCD and uart1 .Only 0Volt is coming.

when i am vary analog input it will also display 0Volt.
so what should i do?
thanks

On Mon, Aug 2, 2010 at 1:09 PM, capiman26061973 wrote:

 

Hello Shweta,

> if you are knowing about ADS7825 then reply me

> > > Digital data is not come into uart1.

you wrote: "into uart1" - Interesting approach...

Have you correctly connected ADS7825 via UART1 ?

Are you sure you used UART1 and not any other interface ?

Which signals of ADS7825 have you connected to which signal

of UART1 ? Can you post the schematic of this project ?

Which baudrate and setting have you used to communicate with ADS7825 ?

Why don't you use the lpc2148 internal AD converter ?

How have you split the project ? What are others doing ?

Best regards,

Martin
thanks for your help
my logic is like this.
ADC_CTRL_SET = ADC_CONVERT;
ADC_CTRL_CLR = ADC_BYTE;
ADC_CTRL_CLR = ADC_CONVERT;
wait(4);
ADC_CTRL_SET = ADC_CONVERT;
while((IO0PIN & ADC_BUSY) == 0);

wait(4);
temp = ADC_DATA_SET;
ADC_CTRL_SET = ADC_BYTE;
for(k=0;k<1;k ++) for(j=0;j<2;j++);
buf = ADC_DATA_SET;

i am configured pin p0.15 to p0.22 as a input pin.Digital data is come on
the pin p0.15 to p0.22 i am taking data like this:
temp = ADC_DATA_SET;
regards,
shweta

On Mon, Aug 2, 2010 at 2:43 PM, Sachin Tiwari wrote:

> 1. Check if you are getting output from ADS7825. If you are using parallel
> interface, you could check using logic analysers. If serial interface, then
> make sure you are getting the reqd output there.
>
> 2. If all this is fine, check the register where you are storing your final
> information, ie converted data from ADS7825. Make sure these values first
> match with your input values. This can be relatively easy using a JTAG
>
> 3. Assuming that your UART program is not a problem. It should be
> relatively simple to move the data from the register to UART.
>
> You need to check it stepwise, just saying that you are not getting the
> output when you give the input is waste of your and others time. There might
> be n number of issues that might be causing this problem. You need to clear
> about your problem statement.
>
> --- On *Mon, 2/8/10, Shweta Parmar * wrote:
> From: Shweta Parmar
> Subject: Re: [lpc2000] Re: interfacing ADS7825 with lpc2148 blueboard
> To: l...
> Date: Monday, 2 August, 2010, 8:04 AM
> i attach schematic in previous posts and also pin number of connection.
> baud rate is 9600
>
> On Mon, Aug 2, 2010 at 1:32 PM, Shweta Parmar
> > wrote:
>
> hi, capiman,
> sorry my english is not good.
> when i am giving 5Volt analog input.Digital data is come out from
> ADS7825.Also data is come from ADS to blueboard pin.But when i am taking
> data from that pin ,and display into LCD and uart1 .Only 0Volt is coming.
>
> when i am vary analog input it will also display 0Volt.
> so what should i do?
> thanks
> On Mon, Aug 2, 2010 at 1:09 PM, capiman26061973
> > wrote:
>
> Hello Shweta,
> > if you are knowing about ADS7825 then reply me
>
> > > > Digital data is not come into uart1.
>
> you wrote: "into uart1" - Interesting approach...
> Have you correctly connected ADS7825 via UART1 ?
> Are you sure you used UART1 and not any other interface ?
> Which signals of ADS7825 have you connected to which signal
> of UART1 ? Can you post the schematic of this project ?
> Which baudrate and setting have you used to communicate with ADS7825 ?
>
> Why don't you use the lpc2148 internal AD converter ?
>
> How have you split the project ? What are others doing ?
>
> Best regards,
>
> Martin
>
>
i am giving +5v to pin 2 of ADS7825 via potentiometer. i am getting value on
LCD and uart1. But when i vary potentiometer value is not change. Value
will change abruptly. i am write temp=IO0PIN. so why this is happen. plz
give your reply.

On Mon, Aug 2, 2010 at 3:22 PM, Shweta Parmar wrote:

> thanks for your help
> my logic is like this.
> ADC_CTRL_SET = ADC_CONVERT;
> ADC_CTRL_CLR = ADC_BYTE;
> ADC_CTRL_CLR = ADC_CONVERT;
> wait(4);
> ADC_CTRL_SET = ADC_CONVERT;
> while((IO0PIN & ADC_BUSY) == 0);
>
> wait(4);
> temp = ADC_DATA_SET;
> ADC_CTRL_SET = ADC_BYTE;
> for(k=0;k<1;k ++) for(j=0;j<2;j++);
> buf = ADC_DATA_SET;
>
> i am configured pin p0.15 to p0.22 as a input pin.Digital data is come on
> the pin p0.15 to p0.22 i am taking data like this:
> temp = ADC_DATA_SET;
> regards,
> shweta
> On Mon, Aug 2, 2010 at 2:43 PM, Sachin Tiwari wrote:
>
>> 1. Check if you are getting output from ADS7825. If you are using parallel
>> interface, you could check using logic analysers. If serial interface, then
>> make sure you are getting the reqd output there.
>>
>> 2. If all this is fine, check the register where you are storing your
>> final information, ie converted data from ADS7825. Make sure these values
>> first match with your input values. This can be relatively easy using a JTAG
>>
>> 3. Assuming that your UART program is not a problem. It should be
>> relatively simple to move the data from the register to UART.
>>
>> You need to check it stepwise, just saying that you are not getting the
>> output when you give the input is waste of your and others time. There might
>> be n number of issues that might be causing this problem. You need to clear
>> about your problem statement.
>>
>> --- On *Mon, 2/8/10, Shweta Parmar * wrote:
>> From: Shweta Parmar
>> Subject: Re: [lpc2000] Re: interfacing ADS7825 with lpc2148 blueboard
>> To: l...
>> Date: Monday, 2 August, 2010, 8:04 AM
>> i attach schematic in previous posts and also pin number of connection.
>> baud rate is 9600
>>
>> On Mon, Aug 2, 2010 at 1:32 PM, Shweta Parmar
>> > wrote:
>>
>> hi, capiman,
>> sorry my english is not good.
>> when i am giving 5Volt analog input.Digital data is come out from
>> ADS7825.Also data is come from ADS to blueboard pin.But when i am taking
>> data from that pin ,and display into LCD and uart1 .Only 0Volt is coming.
>>
>> when i am vary analog input it will also display 0Volt.
>> so what should i do?
>> thanks
>> On Mon, Aug 2, 2010 at 1:09 PM, capiman26061973
>> > wrote:
>>
>> Hello Shweta,
>> > if you are knowing about ADS7825 then reply me
>>
>> > > > Digital data is not come into uart1.
>>
>> you wrote: "into uart1" - Interesting approach...
>> Have you correctly connected ADS7825 via UART1 ?
>> Are you sure you used UART1 and not any other interface ?
>> Which signals of ADS7825 have you connected to which signal
>> of UART1 ? Can you post the schematic of this project ?
>> Which baudrate and setting have you used to communicate with ADS7825 ?
>>
>> Why don't you use the lpc2148 internal AD converter ?
>>
>> How have you split the project ? What are others doing ?
>>
>> Best regards,
>>
>> Martin
>>
>>
Hi,

When you are you calling your adc convert & LCD display function in your
program?

If you are able to display correct data initially, means, you may be
calling it once during initialization.

If you are programming sequentially, then you must call the ADC convert
& display function after defined time for value updation.

As sachin suggested, check the value of register in which you are
getting data from ADS7825; by using JTAG.

All the best.

Thanks

From: l... [mailto:l...] On Behalf
Of Shweta Parmar
Sent: 03 August 2010 09:48
To: l...
Subject: Re: [lpc2000] Re: interfacing ADS7825 with lpc2148 blueboard

i am giving +5v to pin 2 of ADS7825 via potentiometer. i am getting
value on LCD and uart1. But when i vary potentiometer value is not
change. Value will change abruptly. i am write temp=IO0PIN. so why
this is happen. plz give your reply.

On Mon, Aug 2, 2010 at 3:22 PM, Shweta Parmar
wrote:

thanks for your help
my logic is like this.
ADC_CTRL_SET = ADC_CONVERT;
ADC_CTRL_CLR = ADC_BYTE;
ADC_CTRL_CLR = ADC_CONVERT;
wait(4);
ADC_CTRL_SET = ADC_CONVERT;
while((IO0PIN & ADC_BUSY) == 0);

wait(4);
temp = ADC_DATA_SET;
ADC_CTRL_SET = ADC_BYTE;
for(k=0;k<1;k ++) for(j=0;j<2;j++);
buf = ADC_DATA_SET;

i am configured pin p0.15 to p0.22 as a input pin.Digital data is come
on the pin p0.15 to p0.22 i am taking data like this:
temp = ADC_DATA_SET;
regards,
shweta

On Mon, Aug 2, 2010 at 2:43 PM, Sachin Tiwari
wrote:

1. Check if you are getting output from ADS7825. If you are using
parallel interface, you could check using logic analysers. If serial
interface, then make sure you are getting the reqd output there.

2. If all this is fine, check the register where you are storing your
final information, ie converted data from ADS7825. Make sure these
values first match with your input values. This can be relatively easy
using a JTAG

3. Assuming that your UART program is not a problem. It should be
relatively simple to move the data from the register to UART.

You need to check it stepwise, just saying that you are not getting the
output when you give the input is waste of your and others time. There
might be n number of issues that might be causing this problem. You need
to clear about your problem statement.

--- On Mon, 2/8/10, Shweta Parmar wrote:
From: Shweta Parmar
Subject: Re: [lpc2000] Re: interfacing ADS7825 with lpc2148 blueboard
To: l...
Date: Monday, 2 August, 2010, 8:04 AM

i attach schematic in previous posts and also pin number of connection.
baud rate is 9600

On Mon, Aug 2, 2010 at 1:32 PM, Shweta Parmar > wrote:

hi, capiman,
sorry my english is not good.
when i am giving 5Volt analog input.Digital data is come out from
ADS7825.Also data is come from ADS to blueboard pin.But when i am taking
data from that pin ,and display into LCD and uart1 .Only 0Volt is
coming.

when i am vary analog input it will also display 0Volt.
so what should i do?
thanks

On Mon, Aug 2, 2010 at 1:09 PM, capiman26061973 > wrote:

Hello Shweta,

> if you are knowing about ADS7825 then reply me

> > > Digital data is not come into uart1.

you wrote: "into uart1" - Interesting approach...
Have you correctly connected ADS7825 via UART1 ?
Are you sure you used UART1 and not any other interface ?
Which signals of ADS7825 have you connected to which signal
of UART1 ? Can you post the schematic of this project ?
Which baudrate and setting have you used to communicate with ADS7825 ?

Why don't you use the lpc2148 internal AD converter ?

How have you split the project ? What are others doing ?

Best regards,

Martin

Internal Virus Database is out of date.
Checked by AVG - www.avg.com
Version: 9.0.819 / Virus Database: 271.1.1/2842 - Release Date: 04/29/10
11:57:00
thanks
Actually i am getting data into LCD and uart1 by writing like this:
temp = IO0PIN
but i am not getting 0Volt for value 0000 and 5Volt for FFFF.
so what should i do?

On Tue, Aug 3, 2010 at 10:16 AM, Prashant D. Kharade <
p...@adorpower.com> wrote:

> Hi,
>
> When you are you calling your adc convert & LCD display function in your
> program?
>
> If you are able to display correct data initially, means, you may be
> calling it once during initialization.
>
> If you are programming sequentially, then you must call the ADC convert &
> display function after defined time for value updation.
>
> As sachin suggested, check the value of register in which you are getting data
> from ADS7825; by using JTAG.
>
> All the best.
>
> Thanks
>
> *From:* l... [mailto:l...] *On
> Behalf Of *Shweta Parmar
> *Sent:* 03 August 2010 09:48
> *To:* l...
>
> *Subject:* Re: [lpc2000] Re: interfacing ADS7825 with lpc2148 blueboard
>
> i am giving +5v to pin 2 of ADS7825 via potentiometer. i am getting value
> on LCD and uart1. But when i vary potentiometer value is not change. Value
> will change abruptly. i am write temp=IO0PIN. so why this is happen. plz
> give your reply.
>
> On Mon, Aug 2, 2010 at 3:22 PM, Shweta Parmar
> wrote:
>
> thanks for your help
> my logic is like this.
> ADC_CTRL_SET = ADC_CONVERT;
> ADC_CTRL_CLR = ADC_BYTE;
> ADC_CTRL_CLR = ADC_CONVERT;
> wait(4);
> ADC_CTRL_SET = ADC_CONVERT;
> while((IO0PIN & ADC_BUSY) == 0);
>
> wait(4);
> temp = ADC_DATA_SET;
> ADC_CTRL_SET = ADC_BYTE;
> for(k=0;k<1;k ++) for(j=0;j<2;j++);
> buf = ADC_DATA_SET;
>
> i am configured pin p0.15 to p0.22 as a input pin.Digital data is come on
> the pin p0.15 to p0.22 i am taking data like this:
> temp = ADC_DATA_SET;
> regards,
> shweta
>
> On Mon, Aug 2, 2010 at 2:43 PM, Sachin Tiwari
> wrote:
>
> 1. Check if you are getting output from ADS7825. If you are using parallel
> interface, you could check using logic analysers. If serial interface, then
> make sure you are getting the reqd output there.
>
> 2. If all this is fine, check the register where you are storing your final
> information, ie converted data from ADS7825. Make sure these values first
> match with your input values. This can be relatively easy using a JTAG
>
> 3. Assuming that your UART program is not a problem. It should be
> relatively simple to move the data from the register to UART.
>
> You need to check it stepwise, just saying that you are not getting the
> output when you give the input is waste of your and others time. There might
> be n number of issues that might be causing this problem. You need to clear
> about your problem statement.
>
> --- On *Mon, 2/8/10, Shweta Parmar * wrote:
> From: Shweta Parmar
> Subject: Re: [lpc2000] Re: interfacing ADS7825 with lpc2148 blueboard
> To: l...
> Date: Monday, 2 August, 2010, 8:04 AM
>
> i attach schematic in previous posts and also pin number of connection.
> baud rate is 9600
>
> On Mon, Aug 2, 2010 at 1:32 PM, Shweta Parmar >
> wrote:
>
> hi, capiman,
> sorry my english is not good.
> when i am giving 5Volt analog input.Digital data is come out from
> ADS7825.Also data is come from ADS to blueboard pin.But when i am taking
> data from that pin ,and display into LCD and uart1 .Only 0Volt is coming.
>
> when i am vary analog input it will also display 0Volt.
> so what should i do?
> thanks
>
> On Mon, Aug 2, 2010 at 1:09 PM, capiman26061973 >
> wrote:
>
> Hello Shweta,
>
> > if you are knowing about ADS7825 then reply me
>
> > > > Digital data is not come into uart1.
>
> you wrote: "into uart1" - Interesting approach...
> Have you correctly connected ADS7825 via UART1 ?
> Are you sure you used UART1 and not any other interface ?
> Which signals of ADS7825 have you connected to which signal
> of UART1 ? Can you post the schematic of this project ?
> Which baudrate and setting have you used to communicate with ADS7825 ?
>
> Why don't you use the lpc2148 internal AD converter ?
>
> How have you split the project ? What are others doing ?
>
> Best regards,
>
> Martin
>
> Internal Virus Database is out of date.
> Checked by AVG - www.avg.com
> Version: 9.0.819 / Virus Database: 271.1.1/2842 - Release Date: 04/29/10
> 11:57:00
>
>
--- In l..., Shweta Parmar wrote:
>
> thanks
> Actually i am getting data into LCD and uart1 by writing like this:
> temp = IO0PIN
> but i am not getting 0Volt for value 0000 and 5Volt for FFFF.
> so what should i do?

Clearly, that is NOT how you are getting data to the LCD or UART1. There is no way that readng IO0PIN and storing it in a variable 'temp' s going to send ANYTHING to the LCD or UART1.

Second, your pseudo code (macros?) are pretty useless in terms of trying to help with your project. We need to know how the A/D is wired, how the IO port is initialized and how each of those statements results in C code. It doesn't help that the connection details are in a message that is pretty old.

I suppose it matters how fast the peripheral bus is operating and whether the port is toggling faster than the A/D chip can accept.

It isn't clear to me that you have ever gotten UART1 to send even a text string ("Hello World!\n") to a PC or whatever. That would be my very first step (right after I got an LED to blink). Get the UART to send strings. Then I would write numeric conversion routines to convert the binary data from the A/D to character strings. I might use "The C Programming Language" by Kernighan & Ritchie to get some of this code rather that rely on things like printf().

I might just write a collection of functions (probably 5) that 1) emit a '0x' prefix, 2) break a word into shorts and call the short conversion function, 3) break a short into bytes and call the byte conversion function, 4) break a byte into nibbles and call the nibble conversion function and, finally, 5) convert the nibble to an ASCII hex character and send it to the UART.

Once I was absolutely certain that the hex conversion functions and UART were working, I would start with the A/D.

Eventually, you will want to ZIP up your code (the real code, not pseudo code) and post it in the Files folder.

Oh, and don't count on spin loops to implement time delays. If the loop variable isn't declared 'volatile', many compilers will just scrap the loop at any optimization level above 0. How this is handled is compiler specific and, thus, not portable. Check the assembly code to see if the spin loop is still included.

Richard

On Tuesday 03 August 2010 21:05:23 rtstofer wrote:

Jeez!!! you actually have the patience ;-).

> --- In l..., Shweta Parmar
wrote:
> > thanks
> > Actually i am getting data into LCD and uart1 by writing like
> > this: temp = IO0PIN
> > but i am not getting 0Volt for value 0000 and 5Volt for FFFF.
> > so what should i do?
>
> Clearly, that is NOT how you are getting data to the LCD or UART1.
> There is no way that readng IO0PIN and storing it in a variable
> 'temp' s going to send ANYTHING to the LCD or UART1.
>
> Second, your pseudo code (macros?) are pretty useless in terms of
> trying to help with your project. We need to know how the A/D is
> wired, how the IO port is initialized and how each of those
> statements results in C code. It doesn't help that the connection
> details are in a message that is pretty old.
>
> I suppose it matters how fast the peripheral bus is operating and
> whether the port is toggling faster than the A/D chip can accept.
>
> It isn't clear to me that you have ever gotten UART1 to send even a
> text string ("Hello World!\n") to a PC or whatever. That would be
> my very first step (right after I got an LED to blink). Get the
> UART to send strings. Then I would write numeric conversion
> routines to convert the binary data from the A/D to character
> strings. I might use "The C Programming Language" by Kernighan &
> Ritchie to get some of this code rather that rely on things like
> printf().
>
> I might just write a collection of functions (probably 5) that 1)
> emit a '0x' prefix, 2) break a word into shorts and call the short
> conversion function, 3) break a short into bytes and call the byte
> conversion function, 4) break a byte into nibbles and call the
> nibble conversion function and, finally, 5) convert the nibble to
> an ASCII hex character and send it to the UART.
>
> Once I was absolutely certain that the hex conversion functions and
> UART were working, I would start with the A/D.
>
> Eventually, you will want to ZIP up your code (the real code, not
> pseudo code) and post it in the Files folder.
>
> Oh, and don't count on spin loops to implement time delays. If the
> loop variable isn't declared 'volatile', many compilers will just
> scrap the loop at any optimization level above 0. How this is
> handled is compiler specific and, thus, not portable. Check the
> assembly code to see if the spin loop is still included.
>
> Richard

--
Rgds
JTD