Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
4 years, 3 months ago.
Unknown Shift of AnalogOut Pins
I'm a novice at mbed. When I use mbed to build program for my Nucleo F303K8 board, I found the AnalogOut Pins will shift! There are three DAC channels on this board: PA_4 (A3), PA_5 (A4), and PA_6 (A5). For example, when I define: AnalogOut aop1(PA_4); and execute: aop1=1; It's ok. And the voltage on PA_4 is exactly 3.3V.
Or, if I define: AnalogOut aop1(PA_4); AnalogOut aop2(PA_5); and execute: aop1=1; It also works well.
BUT, if I define both PA_4 and PA_6 together, like: AnalogOut aop1(PA_4); AnalogOut aop3(PA_6); and execute: aop1=1; I CAN'T get any voltage on PA_4 pin, WHILE the voltage on PA_6 will be 3.3V!
Furthermore, when I use all of three pins, like: AnalogOut aop1(PA_4); AnalogOut aop2(PA_5); AnalogOut aop3(PA_6); and execute: aop1=1; aop2=1; aop3=1; Only PA_6 has a 3.3V voltage. For both PA_4 and PA_5, the voltage is ZERO.
When the command 'AnalogOut' is replaced by 'DigitalOut', it runs smoothly.
I'm quite puzzled about what happen. Hope someone could address my question.
Question relating to:
4 years ago.
Check User Manual, Solder bridges SB16 and SB18 link PA_6 and PA_5 to PB_6 and PB_7 respectively. Something to do with i2c compatibility with Arduino Uno. SB16 and SB18 need to be removed to 'float' PA_5 and PA_6.