目录

PORT

Abstract

The PORTs are registers for bi-directional I/O. There are three registers called PORTB, PORTC and PORTD.

Source Code

The PORTB, PORTC and PORTD are defined in hardware/tools/avr/avr/include/avr/iom328p.h as below.

#define PORTB _SFR_IO8(0x05)
#define PORTC _SFR_IO8(0x08)
#define PORTD _SFR_IO8(0x0B)

0x05, 0x07, and 0x0A are I/O addresses of PORTB, PORTC and PORTD respectively. They call _SFR_IO8().