hello ,
i want to interface msp430afe252 with msp430g2553 via spi ....
please help me with the code...i want to use 3wire spi mode
as i have only one slave....
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
hello ,
i want to interface msp430afe252 with msp430g2553 via spi ....
please help me with the code...i want to use 3wire spi mode
as i have only one slave....
Hi Raj,
unfortunately I cannot give you code, but maybe I can help you to set up the code yourself.
First of all you should read the corresponding sections in the MCU User guide (chapter 16) There you will find further information on how SPI works.
The code that you have to set up basically just to configure the USCI registers.
"Initializing or Re-Configuring the USCI Module
The recommended USCI initialization/re-configuration process is:
1. Set UCSWRST (BIS.B #UCSWRST,&UCxCTL1)
2. Initialize all USCI registers with UCSWRST=1 (including UCxCTL1)
3. Configure ports
4. Clear UCSWRST via software (BIC.B #UCSWRST,&UCxCTL1)
5. Enable interrupts (optional) via UCxRXIE and/or UCxTXIE"
(taken from the Users Guide)
The next thing is the actual communication. This depends on what you want to send from which MCU to another and the timing etc etc.
You can also use some of the excellent documented code examples from TI (http://www.ti.com/mcu/docs/mcuproductcontentnp.tsp?sectionId=95&familyId=342&tabId=3357#MSP430Code)
Hope this helps
If this answers your question please click the "Verifiy Answer" Button, Thanks
hii
thanx Maximilian...
but my problem is my msp430afe252 has usart0 only no usci...
datasheet is not providing sufficient information...
m doing my best...
Have you tried chapter 19 in the User Guide, "USART Peripheral Interface, SPI Mode"
That maybe what your looking for.
Have you read these two chapters of the Users Guide?
There are some examples in MSP430ware for USART SPI mode, albeit under a different device family. e.g. see msp430xG46x_usart1_spi0_09.c (SPI 3-Wire Master) and msp430xG46x_usart1_spi0_10.c (SPI 3-Wire Slave) in examples\devices\4xx\MSP430FG461x Code Examples\Craj gokhale said:but my problem is my msp430afe252 has usart0 only no usci...
i have MSP430 Microcontroller Basics user guide and it has only 11 chapters..
you r talking about which user guide..
please give me its URL......
thanx
The Users Guide to the MCUs that you are using. you can find them on the pages of your MCU (The links in your first post). Fortunately it is the same Users Guide for both MCUs
http://www.ti.com/litv/pdf/slau144i
thats the link.
If this answers your question please click the "Verifiy Answer" Button, Thanks
Your welcome :D
I further recommend you to take a look here http://e2e.ti.com/support/microcontrollers/msp43016-bit_ultra-low_power_mcus/f/166/t/55315.aspx
That are some basics, which make it easier for others to help you.
**Attention** This is a public forum