Tool/software: Code Composer Studio
Dear All,
This is vikash Chandra Raman, I am doing a project on MSP430F5529. I am interfacing ACS71020 ic with SPI Communications. I have to send 32 bit registers through Spi And also i have to recieve 32 bit data from ACS71020 on controller RXBUFF.
i have send 32 bit registers, through send functions, kindly check my send function.
sync_low;
send(0x2325,2),send(0x5626,2)
sync_high;
void send( int data,int i)
{
int l;
__disable_interrupt();
l=data;
l=l>>8;
while(i){
while(!( UCB1IFG & UCTXIFG));
UCB1TXBUF = l;
l=data;
i--;
}
while(UCB1STAT & UCBUSY);
__enable_interrupt();
}
It successfully send, But when i recieve the data it only recieve 8 bit , it is showing on RXBUFF.
So , i requested to say that if i have to recieve 32 bit data on rxbuff, what should i do.
kindly tell me the solution or give some ideas.
waiting for your positive response
Vikash chandra Raman
Comcon industries
New-Delhi