This thread is dedicated to questions for the Internet of the Backyard challenge; Texas Instruments' staff will be monitoring it regularly.
Thanks!
This thread is dedicated to questions for the Internet of the Backyard challenge; Texas Instruments' staff will be monitoring it regularly.
Thanks!
Hello!
I was struglling with CC3200 analog input ADC example. It was not working. Sometimes giving only erratic values, sometimes only zero ADC values. Only the timer bits increased as they should. Found a forum topic about this bug:
http://e2e.ti.com/support/wireless_connectivity/f/968/t/365450.aspx
http://e2e.ti.com/support/wireless_connectivity/f/968/p/354092/1243186.aspx#1243186
Need a line in while (forewer) loop uiIndex=0;
ADC on PIN_57 is not allowed by example. Why? It giving value around 1090 regardless if connected to GND or not.
ADC on pins PIN_58 and PIN_59 do not have resistors "dnp" on P3 header. (Actually resistors are on P1 header so one can connect signals there).
There is another strange thing. It ADC input is floating the voltage on it is 0.5 V. If pin_60 is tied to GND via 100k then voltage is 0.4 V.
Is there some pull-up on the pin that has to be additionally disabled?
I made a voltage divider using 100k and 1Meg. 0.1 uF cap at ADC input was necessary to prevent pickup.
I have changed example to a function that returns just 1 value read from CC3200 ADC. A delay was added between enabling ADC and readout allowing the input voltage to settle down. Without such delay the value was erratic.
----------------------------------------------------------------
float readADC(unsigned long uiAdcInputPin)
{ unsigned int uiChannel;
unsigned long ulSample;
//uiAdcInputPin=PIN_60;
PinTypeADC(uiAdcInputPin, 0xFF);
switch(uiAdcInputPin)
{
case PIN_58: {uiChannel = ADC_CH_1;}break;
case PIN_59: {uiChannel = ADC_CH_2;}break;
case PIN_60: {uiChannel = ADC_CH_3;}break;
default: break;
}
MAP_ADCChannelEnable(ADC_BASE, uiChannel);
MAP_ADCEnable(ADC_BASE);
MAP_UtilsDelay(800000);
if(MAP_ADCFIFOLvlGet(ADC_BASE, uiChannel))
{
ulSample = MAP_ADCFIFORead(ADC_BASE, uiChannel);
ulSample = (ulSample & 0x3ffc)>>2;
}
// UART_PRINT(" %d \n\r", ulSample);
return ulSample;
}
----------------------------------------------------------------
Hello!
I was struglling with CC3200 analog input ADC example. It was not working. Sometimes giving only erratic values, sometimes only zero ADC values. Only the timer bits increased as they should. Found a forum topic about this bug:
http://e2e.ti.com/support/wireless_connectivity/f/968/t/365450.aspx
http://e2e.ti.com/support/wireless_connectivity/f/968/p/354092/1243186.aspx#1243186
Need a line in while (forewer) loop uiIndex=0;
ADC on PIN_57 is not allowed by example. Why? It giving value around 1090 regardless if connected to GND or not.
ADC on pins PIN_58 and PIN_59 do not have resistors "dnp" on P3 header. (Actually resistors are on P1 header so one can connect signals there).
There is another strange thing. It ADC input is floating the voltage on it is 0.5 V. If pin_60 is tied to GND via 100k then voltage is 0.4 V.
Is there some pull-up on the pin that has to be additionally disabled?
I made a voltage divider using 100k and 1Meg. 0.1 uF cap at ADC input was necessary to prevent pickup.
I have changed example to a function that returns just 1 value read from CC3200 ADC. A delay was added between enabling ADC and readout allowing the input voltage to settle down. Without such delay the value was erratic.
----------------------------------------------------------------
float readADC(unsigned long uiAdcInputPin)
{ unsigned int uiChannel;
unsigned long ulSample;
//uiAdcInputPin=PIN_60;
PinTypeADC(uiAdcInputPin, 0xFF);
switch(uiAdcInputPin)
{
case PIN_58: {uiChannel = ADC_CH_1;}break;
case PIN_59: {uiChannel = ADC_CH_2;}break;
case PIN_60: {uiChannel = ADC_CH_3;}break;
default: break;
}
MAP_ADCChannelEnable(ADC_BASE, uiChannel);
MAP_ADCEnable(ADC_BASE);
MAP_UtilsDelay(800000);
if(MAP_ADCFIFOLvlGet(ADC_BASE, uiChannel))
{
ulSample = MAP_ADCFIFORead(ADC_BASE, uiChannel);
ulSample = (ulSample & 0x3ffc)>>2;
}
// UART_PRINT(" %d \n\r", ulSample);
return ulSample;
}
----------------------------------------------------------------