0

I would like to know how can I change LED pin for avr_boot bootloader.

I can see there is option in variants folder but in the manual it mention "if using USE_LED adapt LED-pins in asmfunc.S" which is not clear. I am using pin PC3 how do I write it.

1 Answer 1

2

Near the top of asmfunc.S, you have these lines:

; LED Pins #define DDR_SS _SFR_IO_ADDR(DDRD), 5 // SS pin (PIN, PORT) #define PORT_SS _SFR_IO_ADDR(PORTD), 5 #define DDR_PW _SFR_IO_ADDR(DDRD), 6 // Power pin (PIN, PORT) #define PORT_PW _SFR_IO_ADDR(PORTD), 6 

These define the “write” or “slave select” LED pin as PD5 (registers DDRD and PORTD, bit 5), and the “power” LED as PD6 (registers DDRD and PORTD, bit  6).

These are the lines you have to change if using different pins. For example, pin PC3 is: registers DDRC and PORTC, bit 3.

2
  • Got it. I am using port PC3 so how do I write it. Also do I have to do anything else. Commented Aug 22, 2022 at 20:57
  • 1
    I do not know what each of these LEDs mean. Regarding PC3, see amended answer. Commented Aug 22, 2022 at 21:01

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.