Writing Reserved Registers

If code should by accident write to a reserved register, Microchip can not guarantee the behavior of the application.

This chapter describes what to be aware of when using code designed for the ATmega48/88/168 on the ATmega48PB/88PB/168PB. If by mistake, the code accesses reserved registers or bit locations, the previous device might still operate as expected. On the newer devices these registers or bits might have specific functions, hence unexpected behavior can be observed.

On the ATmega48/88/168 register location 0x4F is reserved as shown in figure Figure 1.

Figure 1. Extract From the ATmega48/88/168 Data Sheet

On the ATmega48PB/88PB/168PB register location 0x4F is the ACSR0 register. This register contains one bit that controls the analog comparator output to Pin 3, ACOE - Analog Comparator Output Enable, as shown in figure Figure 2.

Figure 2. Extract From the ATmega48PB/88PB/168PB Data Sheet

If the ACO is enabled by accident, and ATmega48PB/88PB/168PB is used as a drop-in replacement for ATmega48/88/168, the ACO can potentially try to drive a pin which is connected to GND, and this can lead to unexpected behavior.