Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 216199

Forum Post: RE: msp430 UART transmission problem

$
0
0

1) A physical button press is not instantaneous, and probably lasts (at least) 10s of msec. If you want to respond to the Action of pressing it, you need to register that it happened and wait a little while before looking again. This is a first-cousin of the "switch bounce" problem, which has been well-discussed in this Forum and elsewhere; that's the next thing you'll bump into, so you might do well to research it now.

2) What piece of code moves UCA0RXBUF into "tmp"? If it's elsewhere, it's unlikely UCA0RXIFG is still set when you get to this code (and if it is set you're probably already off-by-one in your protocol).

3) I think you have the sense of UCA0TXIFG backwards; try "while(!(IFG2 & UCA0TXIFG)) /*EMPTY*/;".


Viewing all articles
Browse latest Browse all 216199

Trending Articles



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