AnalogInOut

27 Sep 2012

Hi mbed gurus,

I haven't been able to find anything about a bi-directional Analog pin. Just wanted to leave a suggestion that this would be awesome! Pin 18 can be used as AnalogIn, or AnalogOut, but apparently not AnalogInOut. At least not yet? This is in comparison to DigitalInOut.

Cheers,

Jay

02 Oct 2012

Hi Jay,

Out of interest what would the application of this function be?

02 Oct 2012

I am experimenting with an analog mux/demux and would like to be able to send an Analog voltage and receive an Analog voltage on the same signal pin.

Cheers,

Jay

06 Feb 2014

Hi Jay

I'm working on analogIn Pin 19. I'm sending an audio to it but I'm unable to check that how much frequency is coming ?

Can you provide me some suggestion on it.

Thanks

09 Feb 2016

Hello, can someone help me? I need a program that send the 20v voltage from mbed analog output pin 18 to a device. also, I can read that on a tear terminal program on the PC. Is that possible? thank you

10 Feb 2016

sasa sasa,

You should post this as a new question/forum post rather than posting on 3 different long dead forum threads.

No program will give you a 20V output out of a 3.3V cpu. You will need some form of external amplifier to get anything over 3V out.

"also, I can read that on a tear terminal program on the PC"

Can read what on a terminal program? Yes you can output to a terminal easily enough. But what do you want to display? That the output is on?

15 Feb 2016

hello thank you for helping me. do you have the code that make me able to send 1 volt from mbed analog output pin 18. Also, how can I read a negative voltage value on oscilloscope ? thank you

15 Feb 2016

1 volt on an analog out:

#include "mbed.h"
AnalogOut aout(p18);
main() {
aout = 1/3.3;
while (1)
  wait (100);
}

"how can I read a negative voltage value on oscilloscope ?"

The same way you read a positive voltage only the trace will be below the 0V line rather than above it. If 0V is set to be the bottom of the screen then move the trace up.