2012-01-07 08:13 AM
2012-01-07 08:42 AM
Why do you believe you have 16-bit results? The A/D is a 12-bit converter and you have it setup for 12-bit results, right-justified. So the 16-bit data you're looking at should have the top 4 bits being zeros, and the lower 12 bits being ADC data.
2012-01-07 08:47 AM
Because i add LCD function which display results from ADC and results are about 65000 to 4000.
2012-01-07 10:43 AM
You are missing:
/* Enable ADC1 DMA since ADC1 is the Master*/ ADC_DMACmd(ADC1, ENABLE); This can cause the results you are seeing. To verify all is well, apply known test voltages on one or more pins. If the pins are left floating, the answers will float also, within the 0 to 4095 range if the code is correct. Cheers, Hal2012-01-13 06:03 AM
Perhaps you have discovered this already, but if not:
The ADC_InitStructure has 7 parameters. Your code initializes only 6 of them. Add the following: ADC_InitStructure.ADC_ExternalTrigConv=0x00; Cheers, Hal