Playing with Arduino
A page to record my playing with Arduino
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.

1
2
3
#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().

Version

Arduino 1.8.13/avr-gcc 7.3.0-atmel3.6.1-arduino

Last Update

June 19, 2020

inserted by FC2 system