Dear folks,
Hi. I'm using an Arduino Micro to send but NOT receive MIDI. I'd love to use the RX pin as a simple digital input while the TX pin is chugging away sending MIDI. Is that possible? All other pins are already occupied.
Thanks,
Doug
Does Serial1 monopolize both RX and TX?
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: Does Serial1 monopolize both RX and TX?
Good question. I think that all you need to do is to clear bit 4 (receiver enable) of the USART Control and Status Register B (UCSR1B)
Try putting this into your setup AFTER you call Serial1.begin, and BEFORE you try to configure the pin for input:
Try putting this into your setup AFTER you call Serial1.begin, and BEFORE you try to configure the pin for input:
Code: Select all
cli(UCSR1B, RXEN1);
Please be positive and constructive with your questions and comments.