I/O pin mapping of leonardo for Pin PB0 PCINT0/SS

Hi all, i want to use the Atmega32U4 Pin8 (PB0 PCINT0/SS) as a digital output. But where can i find a number of this pin for the pinmode command ? (like pinmode(13,output) for PC7) The hardware pin mapping shows that there is the RXLED signal connected to PB0.

Do you have any ideas how i could set this PB0 to output ?

regards Mario

Since it is used for the RX LED it is certainly not given an Arduino pin number. You can't use it with pinMode() or digitalWrite(). You will have to use direct port manipulation of DDRB, PORTB, and PINB. Of course the USB firmware will continue to blink that light if you receive any characters over the USB cable.

Why did you want to use that particular pin?

Hi johnwasser,

i created my own pcb layout with the Atmega32U4 and some other hardware, but i want to use the arduino IDE to program the device. If there is no constant for the PIN another way could be the manipulation of the Arduino USB source code not to use this pin. But where can i find the sources for the arduino leonardo ?

regards Mario

Solved !

I found the source code in the arduino installation dir ;) ::) 1. removing a few lines with RXLED and TXLED in USBCore.cpp 2. using pinMode with Pin No. 17 (take a look into pins_arduino.h for leonardo, you found digital_pin_to_bit_mask_PGM, PB0 => D17)

Now it works fine...