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.

Is anyone ever used ADCS7476?

Status
Not open for further replies.

satria02

Junior Member level 2
Joined
Apr 22, 2011
Messages
24
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Bandung
Activity points
1,467
Hi...
Is anyone ever used ADCS7476?
can you share your experience to me about how to access ADCS7476?

I have searched for information from datasheet and internet about how to access this device, but i do not get enough clear information about it....

thanks...
 

Give us a hint? Who is the manufacturer and what does it do?

You can use google to find the datasheet
**broken link removed**

12bit AD converter with serial interface.

Alex
 

It seems to have a simple SPI-bus interface. Your controller may have a SPI port built-in -- if not you can "bit bang" the necessary signals through a standard I/O port (see Bit Bang for details).
 

actually i access ADCS7476 by using some trick....
i make clock signal manually and then take data ADC bit by bit until i get 16 bits data of ADCS7476....
when using this trick,i think that it's too slow....to take 16 bits data of ADC, it need 25us...

this is my code...

CS_LOW();
i=1;
dataI = 0x0000;
dataQ = 0x0000;
while(i<16)
{
SCL_LOW();
//_delay_us(0.02);
dataI<<=1;
dataQ<<=1;
geserI = (PINB&0b00000100); //0b10000000
geserQ = (PIND&0b00010000);
i++;
SCL_HIGH();
geserI>>=2;//7
geserQ>>=4;
dataI |=geserI;
dataQ |=geserQ;

}
CS_HIGH();
_delay_us(0.05);


I0 = dataI;
Q0 = dataQ;

can you help me to make this program more fast on taking data of 16 bits ADC.....

i get an idea to combine assembler code and C code, but i confuse to realize that....
any one can help me?

thank you very much....
 

Can you try this


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
CS_LOW();
i=0;
dataI = 0x0000;
dataQ = 0x0000;
while(i<16)
{
    SCL_LOW();
//_delay_us(0.02);
    dataI |= ((PINB&0b00000100)>>2)<<i;
    dataQ |= ((PIND&0b00010000)>>4)<<i; 
    i++;
    SCL_HIGH();
}
CS_HIGH();
_delay_us(0.05);
 
 
I0 = dataI;
Q0 = dataQ;



or

Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
CS_LOW();
i=0;
dataI = 0x0000;
dataQ = 0x0000;
while(i<16)
{
    SCL_LOW();
//_delay_us(0.02);
    if (PINB&0b00000100) dataI |= (1<<i);
    if (PIND&0b00010000) dataQ |= (1<<i);   
    i++;
    SCL_HIGH();
}
CS_HIGH();
_delay_us(0.05);
 
 
I0 = dataI;
Q0 = dataQ;



the second way may be faster

An alternative would be to use an external shift register to get the 8bit result and provide ir with one read in the parallel port, and then do that again for the remaining 8bits.

Alex

---------- Post added at 15:57 ---------- Previous post was at 15:32 ----------

I have tested your way with the two ways I have provided, the execution time is exactly the same so I guess the compiler does a good job an the result is the same.
So that leaves only the alternative solution with the external shift register, unless someone can optimize your code to execute faster.

Another question is why do you read 16bits when the ADC provides just 12bit result?
Did you try with the mcu SPI, was it slower?

Alex
 
Last edited:

because this ADC provides 16 bits data, whereas 4 bits are zero bit, and 12 bits data....and this ADC cycle clock are 16 clock....

i didn't try with mcu SPI because i need to get data of ADC on the same time or on the same clock (on the same condition)....
another reason is i used mcu SPI pin to access the other device....
 

i didn't try with mcu SPI because i need to get data of ADC on the same time or on the same clock (on the same condition)....
I don't understand what you mean.

You can use two devices in the same spi link and then enable the one you want to use.
Even if you do it your way (one using spi and one using simple port pin) you are still using either the SPI link device either the connection to the ADC, you can't use them both at the same time because the mcu can't do multitasking.

Alex
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top