Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 4923

STM32F042 Reading ADC with Analog MUX 74HC4067

$
0
0
Hello everyone,

I have designed a circuit that will be read 15 analog inputs. Because I use the STM32F042K6T6 as a MCU, I needed to use an analog MUX to read each inputs. I use the ADC peripheral with continuous conversion mode, 239.5 Cycles. And I have written a code to each inputs with 74HC4067 like following:

void Read_ADC_From_74HC4067(void)
{
for ( uint8_t z = 0; z <= 15; z += 1 )
{
//Z'nin degerine göre Kanal secimi yapilacak.
HAL_GPIO_WritePin(GPIOA, ADC_CH_SELECT0_Pin, ( z >>...

STM32F042 Reading ADC with Analog MUX 74HC4067

Viewing all articles
Browse latest Browse all 4923

Trending Articles