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.

Interfacing AD7366 with MSP430f2350

Status
Not open for further replies.

RonaldCUHK

Newbie level 3
Joined
Apr 7, 2012
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,326
Dose any one have experience on using AD7366
.I would like to use it do the sampling part and I use MSP430f2350 to control AD7366.
MSP430f2350 send out three signals.

1.CS
2.CNVST
3.SCLK

and I have connected the DOUTA pin to the MCU pin
And the BUSY have replied but seems the DOUTA pin does not have any difference between I use the analog input and zero input.

Please suggest me what need to do.Thanks
 

To start with a simple thing. CS is an asynchronous input directly controlling DOUTx output enables, so it's effectively impossible that no change of output state occurs when activating it. The outputs should change from high Z to either 0 or 1.

Generally, check all supply voltages and correct level/timing of serial interface signals.
 
This is the #C code on my MCU below and it will get the signal from the ADC and send to MCU(UCB0RXBUF);
.The MCU will send to RS232 (UCA0TXBUF )and then send to the PC.
I would like to ask that should I modify the code for the conversion between ADC and MCU?And how to modify them?
Please suggest me what need to do?Thanks.



Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
while(1)
  { P2OUT &= ~0x20;   //  /CNVST
        _NOP();     
  P2OUT |= 0x20;
     P3OUT &= ~0x40;       //  /CS              
  IFG2 &= ~UCB0RXIFG;        
 
    UCB0TXBUF = 0x00;    // SCLK
    UCB0TXBUF = 0x00;    //SCLK
 
    while (!(IFG2 & UCB0RXIFG));            // RXBUF ready?
   UCA0TXBUF = UCB0RXBUF;
    P3OUT |= 0x40;// Return /LD to high                      
  }}

 
Last edited by a moderator:

You didn't yet answer the questions in your previous post related to the same topic.

I'm not motivated to study MSP430 details, some more comments may be helpful for those who aren't familiar with it.

In the present code:
- you are not waiting for conversion ready
- I guess, UCB0TXBUF = 0x00 is triggering a SPI byte transfer. If so, is it correct to start a second transmission without waiting for end of the first?
- did you check correct SPI mode setup according to AD7366 requirements
 
Hello!

The problem of your code is that it looks like a plain echo program (you just fill the
Tx buffer with what you received on Rx).
You should use the Rx buffer somewhere instead of resending it to SPI.

Dora.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top