3.2.2.3 Initial I/O Port Configuration

The initial start-up configuration of PORTB and PORTC is done according to the EEPROM settings. See the following:

  • Definition of the data direction of each digital I/O pin (input/output)
  • Definition of the output value (high/low) if a pin is defined as output
  • Enabling/disabling of a pull-up resistor if a pin is defined as input
  • Enabling/disabling of the high/low side drivers on PB7 and the high side driver on PB4
  • Pin change interrupt configuration

The initial port settings are configured in the EEPROM variables eepio.confDDRB, eepio.confDDRC, eepio.confMCUCR, eepio.confPCICR, eepio.confPCMSK0, eepio.confPCMSK1, eepio.confPORTB and eepio.confPORTC. See sEEPromIOConfig eepio from Related Links.

Address Name Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
0x000D confDDRB DDRB[7:0]
0x000E confDDRC DDRC[7:0]
0x000F confMCUCR PB7HS PB7LS PB4HS PUD ENPS SPIIO IVSEL ÎVCE
0x0010 confPCICR PCIE[1:0]
0x0011 confPCMSK0 PCMSK0[7:0]
0x0012 confPCMSK1 PCMSK1[7:0]
0x0013 confPORTB PORTB[7:0]
0x0014 confPORTC PORTC[7:0]

The initial I/O port configuration is automatically overwritten by the firmware if certain modes and functions are selected. For more details on the description of the I/O ports hardware IP, see I/O Ports from Related Links.