DDR

Abstract

The DDR(Data Direction Register)s are registers which determine if the digital pin is output mode or input mode. There are three registers called DDRB, DDRC and DDRD.

Source Code

The DDRB, DDRC and DDRD are defined in hardware/tools/avr/avr/include/avr/iom328p.h as below.

1
2
3
#define DDRB _SFR_IO8(0x04)
#define DDRC _SFR_IO8(0x07)
#define DDRD _SFR_IO8(0x0A)

0x04, 0x07, and 0x0A are I/O addresses of DDRB, DDRC and DDRD respectively. They call _SFR_IO8().

Version

7.3.0-atmel3.6.1-arduino7

Last Update

May 15, 2021

inserted by FC2 system