Thank you for such detailed description. can you advice me on a question here? I am recieving sampled data from ADS1220 chip from 3 channel sequentially via spi in MSP430f5529 Mcu but when I try to forward that value to serial port via UART to see it in Maltab I get "ñ/ c ó Ó/ " p/ ] ‰ -/ A ‘ ¿/ ˆ ä &/ " note that I am using "/" to seperate transactions. But my question is is there a way to send Hex value via uart? Thank you
Really great tutorial for learning UART. Very helpful while getting my MSP430FR2355 working.
Great video as usual. Thank you very much.
Thank you for such detailed description. can you advice me on a question here?
I am recieving sampled data from ADS1220 chip from 3 channel sequentially via spi in MSP430f5529 Mcu but when I try to forward that value to serial port via UART to see it in Maltab I get "ñ/ c ó Ó/ " p/ ] ‰ -/ A ‘ ¿/ ˆ ä &/ " note that I am using "/" to seperate transactions. But my question is is there a way to send Hex value via uart?
Thank you
Why does the code not work?
#include
//MSP430F5358
int main(void)
{
WDTCTL = WDTPW | WDTHOLD; // stop watchdog timer
P5DIR |= BIT3;//LED 4
//--setup UART A2
UCA2CTLW0 |= UCSWRST; // software reset UCA2CTL0 |= UCSWRST; |= set bit
UCA2CTLW0 |= UCSSEL__SMCLK; //choose SMCLK=BRCLK (115200 baud)
UCA2BRW = 8; // prescalar = 8
UCA2MCTL = 0xD6; // OS16=low freq, set modulation
P9SEL &= ~BIT3; // change P4.3 function to A1 UART Tx
P9SEL |= BIT3;
PM5CTL0 &= ~LOCKLPM5; // turn on io
UCA2CTLW0 &= ~UCSWRST; // out of software reset UCA2CTL0 |= UCSWRST; &= ~ clear a bit
int i;
while (1)
{
P5OUT ^= BIT3;//LED 4 // Toggle the pin (XOR operation)
__delay_cycles(100000);// Add a delay to observe the toggling
UCA2TXBUF = 'A'; // transmits ASCII code for 'A' over UART
for(i=0; i