Important changes to questions
We’re making some changes to Mbed Questions. From 10th December 2019 this site will be archived and new questions should be asked on our new forum site. Until that date you can continue to reply to existing questions here but can’t ask new questions.
3 years, 7 months ago.
Can i use a shared pin in two declarations?
On LPC1768 Pin 13 is both SCK on SPI and TX on serial. For a GPS receiver I only need RxD @ 9600 baud. since the receiver only provides data and needs no input.
Can I use pin 14 als RxD for a UART while still using pin 13 as part of an SPI bus?
1 Answer
3 years, 7 months ago.
Yes, just make sure you use 'NC' instead of a real pinname for the unconnected TX pin when you declare the Serial port object.