Good day. I am moving a program that was working on an UNO to a LEONARDO, but the PORTB writes aren't working. A simple test of digitalWrite() works fine, but PORTB writes don't. I am using pins 9-12, and at best I get a faint blip on the LED on pin 9, but that's it. It looks so simple, but yet I must be missing something obvious. I looked at the differences in the pin mapping between UNO and LEONARDO, but didn't find anything. Thanks in advance for any insights. Here is the pertinent code:
Update:
Okay, I tracked the pins down manually, and the list is:
// PORTB = pins 8 - 11
// PORTC = pins 5 & 13
// PORTD = pins 2 - 4, 6, and 12
// Pin 13 PORTC B10000000
// Pin 12 PORTD B01000000
// Pin 11 PORTB B10000000
// Pin 10 PORTB B01000000
// Pin 9 PORTB B00100000
// Pin 8 PORTB B00010000
// Pin 7 PORTE B01000000
// Pin 6 PORTD B10000000
// Pin 5 PORTC B01000000
// Pin 4 PORTD B00010000
// Pin 2 PORTD B00000001
// Pin 2 PORTD B00000010