Hello
If i want to connect output of an ADC(analog to digital converter) to two different ports, e.g. GPIOA and GPIOB, and to modify this selection by means of software code(no hardware modification needed), how is it possible?
Is it adequate to connect ADC output to all of the intended pins and choose desired channel by modification of GPIO pins mode(input/output)?
Thanks.
I'm just watching - but fascinated to know why you'd want to do this...?
Perhaps I'm not reading the requirement properly - an external ADC - wired to two (or more) separate input pins...
I might learn something here!
For analog mode, interleaving two ADC's to increase sample rate perhaps?
You might get away with it if the signal is actively driven, with an opamp for example, and you make sure you never enable the output drivers on any of the selected gpio. You pobably want to add current limiting resistors to prevent overloading the opamp/gpio if this happens accidentally. I wouldn't do this with an unbuffered high impedance input.
You can kill your chip if you connect two GPIO's set to ouput the opposite of eachother.
Thanks for your answer, i was wondering whether this is a solution or not, now my concern is at MCU startup and before GPIO ports initialization, Isn't there any connected ports current source or sink issue to be worry about before ports initialization?
When microcontrollers are reset it's usual for the digital ports to be automatically tri-stated (i.e. high impedance), in which case it is safe to connect them together. Obviously you should check the datasheet for the device you are using to make sure this is the case.
Oh. I missed that you wanted to connect the digital end of adc

Anyway. How do you think using two gpio's is going to increase speed?
Normally, all gpio is equally clocked. Sometimes even slower than the chip.
The last line of my previous post is still valid.
It might help if you told us what MCU you are using.
I still have to encounter a dual-edge AHB with an cortex m4. But I've not seen everything yet.