Sign in

username:

password:



Not a member?

Search avrclub



Search tips

Subscribe to avrclub



avrclub by Keywords

AT90S2313 | AT90S8515 | ATMega | ATmega128 | ECL | FETS | IAR | Keyboard | LCD | STK50 | TMOS | UART

Sponsor

controlSUITE™ software
Comprehensive.
Intuitive.
Optimized.

Real-world software for real-time control. Details Here!

Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | AVRclub | [AVR club] using ad7730 whith micro avr

Atmel AVR Microcontroller discussion group.

[AVR club] using ad7730 whith micro avr - mrsaeed_2002 - Feb 7 16:40:03 2007

i can not using ad7730 whith avr32 (spi)
please help me.
i have a schematicand a sample code to connecting to ad7730.



(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )


[AVR club] Re: using ad7730 whith micro avr - p_m_z2000 - Feb 8 10:12:14 2007

--- In a...@yahoogroups.com, "mrsaeed_2002"
wrote:
>
> i can not using ad7730 whith avr32 (spi)
> please help me.
> i have a schematicand a sample code to connecting to ad7730.
>
i think i can help you .i implemented a project using ad7715 (similar
to ad7730) at first you should use a cristal for your avr " don't use
internal oscillator "
2-use very good refrance voltage
3-you should calibrate ad7715 then you can read from it
4-this function i have written can help you :(for ad7715)

.........................at first

#define ADC_RESET PORTB.1
#define ADC_CS PORTB.3
#define ADC_DRDY PINB.0
#define high 1
#define low 0

.....................in avr initialzation
// SPI initialization
// SPI Type: Master
// SPI Clock Rate: 1000.000 kHz
// SPI Clock Phase: Cycle Start
// SPI Clock Polarity: High
// SPI Data Order: MSB First
SPCR=0x5D;
SPSR=0x00;
................
////////SPI initializing
void adc_init(void)
{
lcd_clear();
lcd_gotoxy(2,0);
lcd_putsf("Please wait");
ADC_RESET=low;

ADC_CS=low; //Set low to AD7715 chip select low pin
ADC_RESET=high; //Set high to AD7715 reset low pin
ADC_CS=high;
delay_ms(1800);
ADC_CS=low;
spi( 0x10 );
ADC_CS=high;
ADC_CS=low; //Communications Register
spi( 0x74); //250Hz update rate
ADC_CS=high; //Setup Register info here
lcd_gotoxy(2,1);
lcd_putsf("Calibrated");
delay_ms(150);
lcd_clear();

}
///////////////////// read_spi() function
unsigned int read_spi()

{
unsigned result;
while ( ADC_DRDY);
while (! ADC_DRDY );
while ( ADC_DRDY );
ADC_CS=low;
spi(0x38);
ADC_CS=high;
ADC_CS=low;
result=(unsigned) spi(0)<<8;
ADC_CS=low;
result|=spi(0);
result=(unsigned) ((unsigned long) result);
return result;
}

if you have any question may i can help you
mehdi zamani

______________________________
controlSUITE™ software. Comprehensive. Intuitive. Optimized.
Real-world software for real-time control. Details Here!



(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )

[AVR club] Re: using ad7730 whith micro avr - mrsaeed_2002 - Feb 8 14:21:45 2007

i reading your code and chenging its for ad7730
but never ready pin not active and i can not reading data from data
reagister.
my ref volt: 2.7
and using 4mh crystal fro ad7730 and 11.0592 crystal from mega32 micro.



(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )

[AVR club] Re: using ad7730 whith micro avr - p_m_z2000 - Feb 10 9:47:08 2007

--- In a...@yahoogroups.com, "mrsaeed_2002"
wrote:
>
> i reading your code and chenging its for ad7730
> but never ready pin not active and i can not reading data from data
> reagister.
> my ref volt: 2.7
> and using 4mh crystal fro ad7730 and 11.0592 crystal from mega32
micro.
>
I change my code maybe it can work on ad7730 .pay attention read the
datasheet first i will send you example


(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )

[AVR club] Re: using ad7730 whith micro avr - mrsaeed_2002 - Feb 12 9:32:24 2007

i can not working whit ad7730.
please helpe me.


(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )

Re: [AVR club] Re: using ad7730 whith micro avr - "A. R. Khorasani" - Feb 12 15:00:36 2007

you have to reset ad7730 before each instruction; its is a bug for ad7730
hardware.

On 2/12/07, mrsaeed_2002 wrote:
>
> i can not working whit ad7730.
> please helpe me.
>
[Non-text portions of this message have been removed]


(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )

[AVR club] Re: using ad7730 whith micro avr - mrsaeed_2002 - Feb 13 8:12:30 2007

--- In a...@yahoogroups.com, "A. R. Khorasani"
wrote:
>
> you have to reset ad7730 before each instruction; its is a bug for
ad7730
> hardware.
>
> you have a sample code about drive ad7730.
when i config cominucation reg in ad7730 and waiting to readypin low .
but never thisevent.
and data register is 0.
______________________________
controlSUITE™ software. Comprehensive. Intuitive. Optimized.
Real-world software for real-time control. Details Here!



(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )

Re: [AVR club] Re: using ad7730 whith micro avr - "A. R. Khorasani" - Feb 13 10:16:52 2007

I only have code for ad7711.

On 2/13/07, mrsaeed_2002 wrote:
>
> --- In a...@yahoogroups.com , "A. R.
> Khorasani"
> wrote:
> >
> > you have to reset ad7730 before each instruction; its is a bug for
> ad7730
> > hardware.
> >
> > you have a sample code about drive ad7730.
> when i config cominucation reg in ad7730 and waiting to readypin low .
> but never thisevent.
> and data register is 0.
>
[Non-text portions of this message have been removed]


(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )

Re: [AVR club] Re: using ad7730 whith micro avr - saeed p - Feb 13 16:00:42 2007

may you send this code ?

"A. R. Khorasani" wrote:
I only have code for ad7711.

On 2/13/07, mrsaeed_2002 wrote:
>
> --- In a...@yahoogroups.com , "A. R.
> Khorasani"
> wrote:
> >
> > you have to reset ad7730 before each instruction; its is a bug for
> ad7730
> > hardware.
> >
> > you have a sample code about drive ad7730.
> when i config cominucation reg in ad7730 and waiting to readypin low .
> but never thisevent.
> and data register is 0.
>

[Non-text portions of this message have been removed]

---------------------------------
Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives. Check it out.

[Non-text portions of this message have been removed]
______________________________
controlSUITE™ software. Comprehensive. Intuitive. Optimized.
Real-world software for real-time control. Details Here!



(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )