Hi all,
I have been tyting to develop my own application based on the accelerometer appl for Ez430-rf2560. I realized that accl for ez430-rf2560 is I2C interface while accl for experimental board is ADC12 interface. I started from TI's slac166 http://www.ti.com/lit/zip/slac166( MSP430F543x, MSP430F541x Code Examples) to debug them on my ez430-rf2560. I tried to set breakpoint and read the register value. THe problem is, I could never see any change on any registers ADC12MEMx (i.e. they are always 0x0000). the code I used is:
ADC12CTL0 = ADC12SHT0_8 + ADC12REFON + ADC12ON;
ADC12CTL1 = ADC12SHP;
ADC12MCTL0 = ADC12SREF_1 + ADC12INCH_10 ;
ADC12CTL0 |= ADC12ENC;
ADC12CTL0 |= ADC12SC;
this is not giving me any change on any ADC12MEMx.
any suggestions are greatly appreciated. thanks in advance
Jingle
Jingle,
I am not sure I understand your issue. We have the accl-app available for the EZ430-RF256x and the PAN13xxETU+MSP-EXP430F5438 kits. Why are you trying to do a porting? Is it to your own hardware?
Miguel
Hi Miguel,
I am not using my own hardware-- I am just trying to develop my software application on ez430-rf256x board. However, the accl app for ez430-rf2560 is a I2C sensor while my goal is to acquire 5 channels of analogue signals simultaneously and send them over BT. I tried to modify the accl app for PAN13xxETU-EXP430F5438 (which is to read accl signal from analogue sensor, unlike ez430-rf2560) and downloaded it on my ez430-rf2560. It's basically working, BT connection is forming, but the ADC12 module looks functioning strange. Thus I decide my first step should be building a small project which only implement ADC12 function and see if that works. I started with TI Slac 166 file.
The problem is, I set break point on the code I pasted previously, I didn't see any change on ADC12MEMx register. Any suggestions?
Thanks in advance
Hi Jingle,
Do you have sensors connected to your ADC12 pins? I am not sure if it will read the noise if those pins are floated. Given that this question is related to the MSP430 itself, I would recommend you asking it on the MSP430 forum where the gurus are :). http://e2e.ti.com/support/microcontrollers/msp43016-bit_ultra-low_power_mcus/f/166.aspx
Regards,
I understand that it is not a good idea to test ADC12 function (for my MSP430BT5190) from a floating I/O port. Hence I built up a segment of code to collect internal temperature sensor's data from INCH_10. I know i have to enable REFON (by setting REFMSTR = 1) and evrything. I debugged the code on my msp430-rf2560 board and opened a register watch window. everything register is set but i never get anything out of ADC12MEM2. desperately need help!
Thanks
FYI, I put the segment code here:
#include "msp430bt5190.h"
void main(void) { WDTCTL = WDTPW + WDTHOLD;
REFCTL0 |= REFVSEL_0 + REFON + REFMSTR;
ADC12CTL0 = ADC12SHT0_8 + ADC12ON ; // Sampling time, ADC12 on
ADC12CTL1 = ADC12SHP + 0x2000; // Use sampling timer ADC12CTL2 = ADC12RES_2;
ADC12MCTL2 = ADC12SREF_1 + ADC12INCH_10;
ADC12IE = 0x0004; // Enable interrupt // 0x01;
ADC12CTL0 |= ADC12SC + ADC12ENC; // Start sampling/conversion "none of the ADC12MEMx changes at this step!!"
}
I have asked our MSP430 team to help you with this specific question. Please refer to the post below.
http://e2e.ti.com/support/microcontrollers/msp43016-bit_ultra-low_power_mcus/f/166/t/188076.aspx