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.
Dear All,
I am trying to do an ADC conversion using msp430g2553 launch pad. I am using The code composer studio here. When I build the code , it is successfully executed. After the debugging and 'RUN', no value displayed in ADC10MEM register. When I stop the execution(RUN button stopped), the value is displayed.Why am I not getting the data in ADC10MEM while executing? How can I do a real time pulse wave conversion in msp430g2553?
Ammassk,
10 Hz isn't very much, so you could easily output them over the application UART while measuring. At 9600 baud with 8N1 format you can (in theory) output 9600 / 10 = 960 bytes/s. Since your ADC needs two bytes, this value is halved to 480 values per second. But this would be very cryptical since you get two single bytes, each represening a portion of the result. For example, having an ADC10 result of 762 would lead to 0x02 0xFA or in decimal 2 and 250, so unreadable without re-conversion to a real number. So you normally would convert the values to ASCII before sending them. This would be 4 bytes for each sample plus one or two control bytes for a new line gives you 960 bytes/s / 6 = 160 complete 4 digit outputs plus control bytes per second in your terminal program.
But this needs two modules to deal with now - the ADC10 and the USCI in UART mode. For both there are programming examples by TI which can be downloaded here. Start with those - take only the ADC10 or the USCI for the moment until you know how they work. Then you can combine them.
Or take the array method, but the G2553 has only 512 bytes of RAM, so not that much. At 10 Hz sampling (is it 10 samples per second or a 10 Hz signal like a sinewave - if it is the second case, then 10 Hz sampling isn't enough!), you will have 20 data bytes per second, so 512 bytes can hold 25 seconds of data (again in theory), but in real life you can only use a small portion of this memory. I would go for the UART method.
But don't try to do too much at the same time. Start in steps, look at the code examples and read the chapters for the modules in the user's guide.
Dennis
**Attention** This is a public forum