Tech Journal Back to Tech Journal

How do I disable the UART in the AVR ATtiny2313?

The UCSRB register controls the transmit and recieve enables (TXEN and RXEN). Set RXEN to 0, to allow the RXD (PD0 port).to be switched into OUTPUT mode. (Otherwise, the RXD remains in OUTPUT).

(This is basically to disable the UART's recieve, which will allow the RXD to be switched to OUTPUT and not just INPUT.)

[Sources: ATtiny 2313 datasheet, and http://avrhelp.mcselec.com/avr_internal_hardware_port_d.htm]

 Edit: When I tried this, it didn't actually work. I even tried disabled the Pull-up on the I/O pins (using the PUD flag in the MCUCR) and that didn't work. Dunno why not.

Last updated on 2009-12-05 12:56:08 -0700, by Shalom Craimer

Back to Tech Journal