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.
10 years, 6 months ago.
How to use 5 inputs and 1 output
Hi, I want to use 5 analogue inputs to mbed board and 1 output from mbed board to DAC MCP4822. I used pin 15, 16, 17, 18 and 20 as 5 analogue inputs to mbed board and used pin 19 for output from mbed to DAC. In code I have written the configuration as
MCP4822 MCP1(p5, p7, p19);
AnalogIn ADC_1(p15), ADC_2(p16), ADC_3(p17), ADC_4(p18), ADC_5(p20);
Is it right?
Question relating to:
1 Answer
10 years, 6 months ago.
The MCP4822 is an SPI DAC. So you need to connect it to one of the SPI ports of the mbed. The mbed's DAC is not used in your setup.