Other Parts Discussed in Thread: LMX2595, USB2ANY
Respected sir,
I am working on LMX2595 and MSP430F5529 to generate 17GHz frequency synthesizer. Now in order to attain this I need to program the micro controller with the values which I get from TICS PRO software. I need to operate the controller in master mode and transfer the data serially to the slave device LMX2595 using SPI protocol. I have came to know that MSP430F5529 has 79x magic constants. Now in order to make use of LMX2595 device as per specific application I need to alter those constants.
1) How to access those 79x magic constants and alter them by programming?
2) I am not able to find the registers with this memory format as 1-bit R?W, 7-bit Address, 16-bit data in MSP430F5529
3 once the data is transferred to the slave device is it mandatory for the slave device to acknowledge back to the master as the slave device(LMX2595) don't have any MOSI pin.
4) In the programming below control registers of channel 0 has been used, Can I access 79x magic constants and alter the values
Operating MSP430F5529 in Master mode to transfer data
#include <msp430.h> // header file for msp430 devices
void IOInitiate(void);
void SPI_master_Initiate(void);
void SPI_Tx(char ByteData);
void main(void)
{
WDTCTL=WDTPW+WDTHOLD; // Stop watchdog timer
IOInitiate(); // input output initialization
SPI_master_Initiate(); //master initialization
__bis_SR_register(GIE); // enable interrupts
//return
char sent_to= 'a';
while(1)
{
SPI_Tx(sent_to); // continues sending data
}
}
void IOInitiate(void)
{
P2DIR |= BIT7; // Set P1.0 to output direction for LED
P2OUT &= ~BIT7; //LOW as default
P3SEL |= BIT0+BIT1+BIT2; // P3.0 UCA0SIMO // P3.1 UCA0SOMI // p3.2 clk
P2SEL |= BIT7; // CS
}
void SPI_master_Initiate(void)
{
UCB0CTL1 |= UCSWRST; // **Put state machine in reset**
UCB0CTL0 |= UCMST+UCSYNC+UCCKPL; //8-bit SPI master Clock polarity high, MSB
UCB0CTL0 |= UCMODE_2; // 4 pin communication
UCB0CTL1 |= UCSSEL_2; // SMCLK // clock selection
UCB0BR0 = 0x00; // SMCLK speed divide by 1 /*******If UCBRx = 0, fBitClock = fBRCLK****/
UCB0BR1 = 0;
UCA0MCTL = 0; // No modulation
UCB0CTL1 &= ~UCSWRST; // **Initialize USCI state machine**
UCB0IE |= UCTXIE; // receving interrupt enable
}
void SPI_Tx(char ByteData)
{
P2OUT &= ~BIT7; // active low for start communication
UCB0TXBUF = ByteData; // Transmit first character
//if (UCB0TXBUF!=ByteData)
while (!(UCB0IFG&UCTXIFG)) ; //hold until transmit finish
P2OUT |= BIT7; // active High for end communication
}
I am a newbie and running out of time. Any help will be greatly appreciated.
Thanks in Advance.