9 years, 10 months ago.

LPCXpresso1549Board AnalogIn AnalogOut Pinassign

Hello. I have got LPCXpresso1549 to make wave sound recorder and player using ADC and DAC. I checked LPCXpresso board schema at http://www.lpcware.com/content/nxpfile/lpc1549-lpcxpresso-board-schematic. It shows that LPC1549 PIO0_12/DAC_OUT connected to LPCXpresso Motor CTL brd 26pin, not connected mbed 18pin AIN3/AOUT. AIN3/AOUT only connected PIO0_5/ADC_3.

So I think that this board cannot use DAC on mbed . Is it true?

Or If I use DAC on this board , Which pin I can use ? , and Whici pin come out for DAC output? LPCXpresso Motor CTL brd 26pin ? or mbed 18pin ? Can I make mbed pin assign to not defined pins under mbed ?

Thank you.

Quote:

But I have more questions. D12(P0_12) pin is also defined for MISO of SPI. http://developer.mbed.org/platforms/LPCXpresso1549/

So I check spi_api.c for 15xx. http://developer.mbed.org/users/mbed_official/code/mbed-src/file/5831be29b0ad/targets/hal/TARGET_NXP/TARGET_LPC15XX/spi_api.c It show no PinMap entry, SwitchMatrix be used, I think.

You can assign SPI pins to any pins for this platform, because it uses switch matrix as you mentioned.

In the platform page, you can find...

Information

Please note that mbed SDK of this platform support SWM (switch matrix) function, so you can assign any pins to any functions except AnalogIn, AnalogOut and I2C.

Quote:

So I wonder that I can use SPI on LPCXpresso1549 by SwitchMatrix trix? and use SPI and DAC out at same time by defining SPI pins to others?

No. You can only use single function (e.g. either AnalogOut or SPI for the P0_12 pin) in your program and can not dynamically switch between these functions.

posted by Toyomasa Watarai 17 Feb 2015

OK I understand it. I change SPI pins to other , and set P0_12 to DAC out. Thank you for replay many times.

posted by Takuya Fukuda 17 Feb 2015

I have just update pinmap of the LPCXpresso1549 platform page (adding AnalogOut pin). https://developer.mbed.org/media/platforms/xLPCXpresso-1549-Arduino_1.png.pagespeed.ic.FjZD5Rf4jP.png

posted by Toyomasa Watarai 20 Feb 2015

Thank you for updating. I made all pin assign from schematic by myself, and found that all pins are connected to motor control board pin headers except for PIO0-14. So I suggest that making another pinmap for motor control board pin headers apart from Arudiono form-factors pinmap, and that SPI ,PWM or any other Swith Matrix function pins are wrote outside of pinmaps . I think that someone mislead those pins are fixed (like me :)) LPC1549 has two SPIs, but it looks like only one SPI from pinmap.

posted by Takuya Fukuda 20 Feb 2015

1 Answer

9 years, 10 months ago.

Hi,

The PIO0_12/DAC_OUT connected to 6-pin of J1 connector (named D12 of Arduino shield). You can use AnalogOut API with the D12 (or P0_12).

AnalogOut aout(D12);

Accepted Answer

Thank you. I have found it from mbed HAL target source and shcematic. And I understand LPCXpresso1549 is not same as mbed pinassign.

But I have more questions. D12(P0_12) pin is also defined for MISO of SPI. http://developer.mbed.org/platforms/LPCXpresso1549/

So I check spi_api.c for 15xx. http://developer.mbed.org/users/mbed_official/code/mbed-src/file/5831be29b0ad/targets/hal/TARGET_NXP/TARGET_LPC15XX/spi_api.c It show no PinMap entry, SwitchMatrix be used, I think.

I check other target(176x) HAL source. http://developer.mbed.org/users/mbed_official/code/mbed-src/file/5831be29b0ad/targets/hal/TARGET_NXP/TARGET_LPC176X/spi_api.c It shows PinMap definitions.

So I wonder that I can use SPI on LPCXpresso1549 by SwitchMatrix trix? and use SPI and DAC out at same time by defining SPI pins to others?

posted by Takuya Fukuda 17 Feb 2015