Last active
August 19, 2020 17:50
-
-
Save w4ilun/b6cffa1a478d233073b6 to your computer and use it in GitHub Desktop.
Using the TX/RX LEDs as extra pins on the Pro Micro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The TX/RX LEDs on the Pro Micro uses the pins PD5 and PB0. | |
You can remove the resistors and use these pins, but you will need to first redefine the TXLED/RXLED pins. | |
In OS X: | |
/Users/USERNAME/Library/Arduino15/packages/SparkFun/hardware/avr/1.1.3/variants/promicro/pins_arduino.h | |
Change these values: | |
#define TX_RX_LED_INIT DDRD |= (1<<5), DDRB |= (1<<0) | |
#define TXLED0 PORTD |= (1<<5) | |
#define TXLED1 PORTD &= ~(1<<5) | |
#define RXLED0 PORTB |= (1<<0) | |
#define RXLED1 PORTB &= ~(1<<0) | |
To: | |
#define TX_RX_LED_INIT DDRD |= (1<<6), DDRF |= (1<<0) | |
#define TXLED0 PORTD |= (1<<6) | |
#define TXLED1 PORTD &= ~(1<<6) | |
#define RXLED0 PORTF |= (1<<0) | |
#define RXLED1 PORTF &= ~(1<<0) | |
* Now using PD6 for TX and PF0 for RX, but it can be any other pin not being used | |
Or: | |
#define TX_RX_LED_INIT DDRD |= (1<<5), DDRB |= (1<<0) | |
#define TXLED0 1 | |
#define TXLED1 1 | |
#define RXLED0 1 | |
#define RXLED1 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment