Does Serial1 monopolize both RX and TX?

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
dgeers
 
Posts: 41
Joined: Mon Jan 24, 2011 5:22 pm

Does Serial1 monopolize both RX and TX?

Post by dgeers »

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

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Does Serial1 monopolize both RX and TX?

Post by adafruit_support_rick »

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:

Code: Select all

   cli(UCSR1B, RXEN1);

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”