Question
ADC frequency
Posted on February 13, 2014 at 14:11
The adc reads from the junction between the two resistors.The problem is it doesn't read correct. If the value is 9v, it reads about 8 or 7.8 and that's when I'm dividing the ADC prescaler by 8 and using the maximum sampling time 239.5The problem was solved when I divide the PCLK2 by 4 but that affected the frequency of TIM1 too.The question is, Is there any other to make the adc reads correctly without the need to change the frequency of the PCLK2??Thanks
Hi all,
I'm using stm32f100c8 with an external oscillator 8MHz to produce a system clock of 24MHz. All the peripherals are on the default division lines.Now the ADC1 which is with the TIM1 on PCLK2 is supposed to read the battery value which reaches 9v.The battery value is an output from a voltage divider, the following picture, the bottom is connected to the ground.
The adc reads from the junction between the two resistors.The problem is it doesn't read correct. If the value is 9v, it reads about 8 or 7.8 and that's when I'm dividing the ADC prescaler by 8 and using the maximum sampling time 239.5The problem was solved when I divide the PCLK2 by 4 but that affected the frequency of TIM1 too.The question is, Is there any other to make the adc reads correctly without the need to change the frequency of the PCLK2??Thanks