I find that the PB6 and PB7 can be used as regular IO pins, namely, PB6→20, PB7→21.
Does the two pins has other characteristics? such as INPUT_PULLUP, or PWM, or interrupt?
Best regards.
If you are using a bare atmega328 chip, those pins will be regular digital input/output pins, with INPUT_PULLUP but not PWM.
If you are using Uno, those pins are not accessible. If you try to attach wires directly to the chip's pins while the chip is on the Uno board, you risk physically damaging the chip or its socket, and you risk damaging the external oscillator with your circuit, or the external oscillator could prevent your external circuit working as expected.
If you are using the Uno core, I don't think pins 20 & 21 will be available to your sketch. If you use miniCore with a stand-alone atmega328, they will be available as pins 20 & 21. If you try to use miniCore with the atmega chip on the Uno board, I don't know if you will be able to program it with serial programming.
Thank you for replying.
This is how it happened: I searched in the web, and find that the miniCore says that the PB6 and PB7 can be used as pin20 & pin21:
After compiling, I get the .hex file, and using a ISP programmer to burn the .hex file, I found that the pin21 (PB7) works very well.
At this time, I have a question: whether PB6/PB7 can be used like other pins in the arduino framwork? I know that some pins has pwm, some pins has external interrupt, and some pins has input pull-up, some pins can be used as both ordinary IO pins and analog input pins, etc. These information can be easily found on the official website of arduino, but what about PB6/PB7? Are they only used as regular IO pins?
See your picture in the first post - all additional functions of the pins are described in diagram.
Pins PB6/PB7 has only two functions - it can be inputs for external clock (XTAL1/XTAL2) and can be used as source of PCINT interrupt.