Ligne 14 : |
Ligne 14 : |
| The “Note/alternate functions” column documents other features of the pin, although some of those features might be impractical to use. | | The “Note/alternate functions” column documents other features of the pin, although some of those features might be impractical to use. |
| | | |
− | {| | + | {| class="wikitable" |
| ! ATmega32U4 | | ! ATmega32U4 |
| |- | | |- |
− | ! pin name
| + | | pin name || Arduino |
− | | Arduino | |
| |- | | |- |
− | ! pin names
| + | | pin names || Romi 32U4 Control Board |
− | | Romi 32U4 Control Board | |
| |- | | |- |
− | ! functions
| + | | functions || Notes/alternate functions |
− | | Notes/alternate functions | |
| |- | | |- |
− | ! PB7
| + | | PB7 || 11 || LCD control line (E) || Timer0 PWM output A (OC0A) |
− | | 11 || LCD control line (E) || Timer0 PWM output A (OC0A) | |
| |- | | |- |
− | ! Timer1 PWM output C (OC1C)
| + | | Timer1 PWM output C (OC1C) |
| |- | | |- |
− | ! UART flow control (RTS)
| + | | UART flow control (RTS) |
| |- | | |- |
− | ! Pin-change interrupt (PCINT7)
| + | | Pin-change interrupt (PCINT7) |
| |- | | |- |
− | ! PD4
| + | | PD4 || 4, A6, 24 || LCD control line (RS) || Analog input (ADC8) |
− | | 4, A6, 24 || LCD control line (RS) || Analog input (ADC8) | |
| |- | | |- |
− | ! Timer1 input capture pin (ICP1)
| + | | Timer1 input capture pin (ICP1) |
| |- | | |- |
− | ! PB3
| + | | PB3 || 14, MISO || User pushbutton A |
− | | 14, MISO || User pushbutton A | |
| |- | | |- |
− | ! LCD data line DB4
| + | | LCD data line DB4 || SPI Master Input/Slave Output (MISO) |
− | | SPI Master Input/Slave Output (MISO) | |
| |- | | |- |
− | ! Pin-change interrupt (PCINT3)
| + | | Pin-change interrupt (PCINT3) |
| |- | | |- |
− | ! ISP programming line (PDO)
| + | | ISP programming line (PDO) |
| |- | | |- |
− | ! PB0
| + | | PB0 || 17, LED_BUILTIN_RX, SS || Red LED (RX) |
− | | 17, LED_BUILTIN_RX, SS || Red LED (RX) | |
| |- | | |- |
− | ! User pushbutton C
| + | | User pushbutton C |
| |- | | |- |
− | ! LCD data line DB5
| + | | LCD data line DB5 || SPI slave select (SS) |
− | | SPI slave select (SS) | |
| |- | | |- |
− | ! Pin-change interrupt (PCINT0)
| + | | Pin-change interrupt (PCINT0) |
| |- | | |- |
− | ! PC7
| + | | PC7 || 13, LED_BUILTIN || Yellow LED |
− | | 13, LED_BUILTIN || Yellow LED | |
| |- | | |- |
− | ! LCD data line DB6
| + | | LCD data line DB6 || Timer4 PWM output A (OC4A) |
− | | Timer4 PWM output A (OC4A) | |
| |- | | |- |
− | ! Timer3 input capture pin (ICP3)
| + | | Timer3 input capture pin (ICP3) |
| |- | | |- |
− | ! Divided system clock output (CLKO)
| + | | Divided system clock output (CLKO) |
| |- | | |- |
− | ! PD5
| + | | PD5 || 30, LED_BUILTIN_TX || Green LED (TX) |
− | | 30, LED_BUILTIN_TX || Green LED (TX) | |
| |- | | |- |
− | ! User pushbutton B
| + | | User pushbutton B |
| |- | | |- |
− | ! LCD data line DB7
| + | | LCD data line DB7 || UART external clock (XCK1) |
− | | UART external clock (XCK1) | |
| |- | | |- |
− | ! UART flow control (CTS)
| + | | UART flow control (CTS) |
| |- | | |- |
− | ! PD7
| + | | PD7 || 6, A7, 25 || Buzzer PWM || Analog input (ADC10) |
− | | 6, A7, 25 || Buzzer PWM || Analog input (ADC10) | |
| |- | | |- |
− | ! Timer4 PWM output D (OC4D)
| + | | Timer4 PWM output D (OC4D) |
| |- | | |- |
− | ! Timer0 counter source (T0)
| + | | Timer0 counter source (T0) |
| |- | | |- |
− | ! PF6
| + | | PF6 || A1, 19 || Battery level input (VIN/3) || Analog input (ADC6) |
− | | A1, 19 || Battery level input (VIN/3) || Analog input (ADC6) | |
| |- | | |- |
− | ! JTAG test data out (TDO)
| + | | JTAG test data out (TDO) |
| |- | | |- |
− | ! PB6
| + | | PB6 || 10, A10, 28 || Left Motor PWM || Analog input (ADC13) |
− | | 10, A10, 28 || Left Motor PWM || Analog input (ADC13) | |
| |- | | |- |
− | ! Timer1 PWM output B (OC1B)
| + | | Timer1 PWM output B (OC1B) |
| |- | | |- |
− | ! Timer4 PWM output B (OC4B)
| + | | Timer4 PWM output B (OC4B) |
| |- | | |- |
− | ! Pin-change interrupt (PCINT6)
| + | | Pin-change interrupt (PCINT6) |
| |- | | |- |
− | ! PB2
| + | | PB2 || 16, MOSI || Left motor direction || SPI Master Output/Slave Input (MOSI) |
− | | 16, MOSI || Left motor direction || SPI Master Output/Slave Input (MOSI) | |
| |- | | |- |
− | ! Pin-change interrupt (PCINT2)
| + | | Pin-change interrupt (PCINT2) |
| |- | | |- |
− | ! ISP programming line (PDI)
| + | | ISP programming line (PDI) |
| |- | | |- |
− | ! PB5
| + | | PB5 || 9, A9, 27 || Right motor PWM || Analog input (ADC12) |
− | | 9, A9, 27 || Right motor PWM || Analog input (ADC12) | |
| |- | | |- |
− | ! Timer1 PWM output A (OC1A)
| + | | Timer1 PWM output A (OC1A) |
| |- | | |- |
− | ! Timer4 PWM output B (OC4B)
| + | | Timer4 PWM output B (OC4B) |
| |- | | |- |
− | ! Pin-change interrupt (PCINT5)
| + | | Pin-change interrupt (PCINT5) |
| |- | | |- |
− | ! PB1
| + | | PB1 || 15, SCK || Right motor direction || SPI Clock (SCK) |
− | | 15, SCK || Right motor direction || SPI Clock (SCK) | |
| |- | | |- |
− | ! Pin-change interrupt (PCINT1)
| + | | Pin-change interrupt (PCINT1) |
| |- | | |- |
− | ! ISP programming line (SCK)
| + | | ISP programming line (SCK) |
| |- | | |- |
− | ! PB4
| + | | PB4 || 8, A8, 26 || Left encoder XORed input || Analog input (ADC11) |
− | | 8, A8, 26 || Left encoder XORed input || Analog input (ADC11) | |
| |- | | |- |
− | ! Pin-change interrupt (PCINT4)
| + | | Pin-change interrupt (PCINT4) |
| |- | | |- |
− | ! PE2
| + | | PE2 || - || Left encoder input || Hardware bootloader select (HWB) |
− | | - || Left encoder input || Hardware bootloader select (HWB) | |
| |- | | |- |
− | ! PE6
| + | | PE6 || 7 || Right encoder XORed input || Analog comparator negative input (AIN0) |
− | | 7 || Right encoder XORed input || Analog comparator negative input (AIN0) | |
| |- | | |- |
− | ! External interrupt source (INT6)
| + | | External interrupt source (INT6) |
| |- | | |- |
− | ! PF0
| + | | PF0 || A5, 23 || Right encoder input || Analog input (ADC0) |
− | | A5, 23 || Right encoder input || Analog input (ADC0) | |
| |- | | |- |
− | ! PD0
| + | | PD0 || 3, SCL || I²C clock for Raspberry Pi communication and inertial sensors || Timer0 PWM output B (OC0B) |
− | | 3, SCL || I²C clock for Raspberry Pi communication and inertial sensors || Timer0 PWM output B (OC0B) | |
| |- | | |- |
− | ! External interrupt source (INT0)
| + | | External interrupt source (INT0) |
| |- | | |- |
− | ! PD1
| + | | PD1 || 2, SDA || I²C data for Raspberry Pi communication and inertial sensors || External interrupt source (INT1) |
− | | 2, SDA || I²C data for Raspberry Pi communication and inertial sensors || External interrupt source (INT1) | |
| |- | | |- |
− | ! PD2
| + | | PD2 || 0 || Free I/O || UART receive pin (RXD1) |
− | | 0 || Free I/O || UART receive pin (RXD1) | |
| |- | | |- |
− | ! External interrupt source (INT2)
| + | | External interrupt source (INT2) |
| |- | | |- |
− | ! PD3
| + | | PD3 || 1 || Free I/O || UART transmit pin (TXD1) |
− | | 1 || Free I/O || UART transmit pin (TXD1) | |
| |- | | |- |
− | ! External interrupt source (INT3)
| + | | External interrupt source (INT3) |
| |- | | |- |
− | ! PC6
| + | | PC6 || 5 || Free I/O || Timer3 PWM output A (OC3A) |
− | | 5 || Free I/O || Timer3 PWM output A (OC3A) | |
| |- | | |- |
− | ! Timer4 PWM output A (OC4A)
| + | | Timer4 PWM output A (OC4A) |
| |- | | |- |
− | ! PD6
| + | | PD6 || 12, A11, 29 || Free I/O || Analog input (ADC9) |
− | | 12, A11, 29 || Free I/O || Analog input (ADC9) | |
| |- | | |- |
− | ! Timer4 PWM output D (OC4D)
| + | | Timer4 PWM output D (OC4D) |
| |- | | |- |
− | ! Timer1 counter source (T1)
| + | | Timer1 counter source (T1) |
| |- | | |- |
− | ! PF7
| + | | PF7 || A0, 18 || Free I/O || Analog input (ADC7) |
− | | A0, 18 || Free I/O || Analog input (ADC7) | |
| |- | | |- |
− | ! JTAG test data in (TDI)
| + | | JTAG test data in (TDI) |
| |- | | |- |
− | ! PF5
| + | | PF5 || A2, 20 || Free I/O || Analog input (ADC5) |
− | | A2, 20 || Free I/O || Analog input (ADC5) | |
| |- | | |- |
− | ! JTAG test mode select (TMS)
| + | | JTAG test mode select (TMS) |
| |- | | |- |
− | ! PF4
| + | | PF4 || A3, 21 || Free I/O || Analog input (ADC4) |
− | | A3, 21 || Free I/O || Analog input (ADC4) | |
| |- | | |- |
− | ! JTAG test clock (TCK)
| + | | JTAG test clock (TCK) |
| |- | | |- |
− | ! PF1
| + | | PF1 || A4, 22 || Free I/O || Analog input (ADC1) |
− | | A4, 22 || Free I/O || Analog input (ADC1) | |
| |- | | |- |
− | ! RESET
| + | | RESET || - || Reset pushbutton || internally pulled high, active low |
− | | - || Reset pushbutton || internally pulled high, active low | |
| |- | | |- |
− | ! AREF
| + | | AREF || - || - || Analog reference |
− | | - || - || Analog reference | |
| |} | | |} |
| | | |
| | | |
| {{Pololu-Romi-32U4-TRAILER}} | | {{Pololu-Romi-32U4-TRAILER}} |