Quantcast
Channel: MSP low-power microcontrollers
Viewing all articles
Browse latest Browse all 62309

Forum Post: RE: MSP430G2553 SPI with MCP23S17

$
0
0
Hi Dennis! You are right about this! That is very important nuance. My timing for now was just lucky. I also found a statement in family's guide about TXIFG set. Your suggestion works very good with safer data transmitting. I have one question - is it safe alternative for data transmitting/receiving approach using code below? P1OUT &= ~_CS; //Set _CS LOW UCA0TXBUF = 0x40; //Send Control Byte (Write) while (!(UCBUSY & UCA0STAT)); //Are TX/RX operation in progress? UCA0TXBUF = 0x12; //Access to GPIOA while (!(UCBUSY & UCA0STAT)); //Are TX/RX operation in progress? UCA0TXBUF = data; //Turn ON OUTPUTS while (!(UCBUSY & UCA0STAT)); //Are TX/RX operation in progress? P1OUT |= _CS; //Set _CS HIGH

Viewing all articles
Browse latest Browse all 62309

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>