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.
Tool/software: TI-RTOS
HI
I'm using the msp430f5529, CCS V7.4 and msp430Ware-v3.80.40.05 SDK.
Unfortunately i'm unable to find any ti-rtos ADC example (like on the other launchpads).
It's very crucial for me to find such an example since i'm planning on migreating my project (which was composed on ti-rtos) from my current lounchpad (msp432p401r) to the msp430f5529.
BEST REGARDS,
AVRAHAM
Void ADC_init(){ GPIO_setAsPeripheralModuleFunctionInputPin(GPIO_PORT_P6, GPIO_PIN1); ADC12_A_init( __MSP430_BASEADDRESS_ADC12_PLUS__, ADC12_A_SAMPLEHOLDSOURCE_SC, ADC12_A_CLOCKSOURCE_ADC12OSC, ADC12_A_CLOCKDIVIDER_1); ADC12_A_setupSamplingTimer( __MSP430_BASEADDRESS_ADC12_PLUS__, ADC12_A_CYCLEHOLD_64_CYCLES, ADC12_A_CYCLEHOLD_64_CYCLES, ADC12_A_MULTIPLESAMPLESDISABLE); ADC12_A_configureMemoryParam config_param; config_param.memoryBufferControlIndex = ADC12_A_MEMORY_0; config_param.inputSourceSelect = ADC12_A_INPUT_A1; config_param.positiveRefVoltageSourceSelect = ADC12_A_VREFPOS_AVCC; config_param.negativeRefVoltageSourceSelect = ADC12_A_VREFNEG_AVSS; config_param.endOfSequence = ADC12_A_ENDOFSEQUENCE; ADC12_A_configureMemory( __MSP430_BASEADDRESS_ADC12_PLUS__, &config_param); ADC12_A_setResolution( __MSP430_BASEADDRESS_ADC12_PLUS__, ADC12_A_RESOLUTION_12BIT); ADC12_A_enable(__MSP430_BASEADDRESS_ADC12_PLUS__); } uint16_t get_one_ADC_reading(){ uint16_t result; ADC12_A_startConversion( __MSP430_BASEADDRESS_ADC12_PLUS__, ADC12_A_MEMORY_0, ADC12_A_SINGLECHANNEL); while(ADC12_A_isBusy(__MSP430_BASEADDRESS_ADC12_PLUS__) == ADC12_A_BUSY); result = ADC12_A_getResults( __MSP430_BASEADDRESS_ADC12_PLUS__, ADC12_A_MEMORY_0); return result; }
How you want to setup your ADC is based on your application, but this should be enough to get you going. It has all the calls to initialize and utilize the ADC. Good luck.
**Attention** This is a public forum