Atmega328 AU has a low Voltage output pin
The package type of ATmega328-AU is Plastic Thin Quad Flat Package (TQFP). The pin configuration is different from the 28 SPDIP package types. On 28 SPDIP package, pins 9 and 10 are crystal input. In this case, you could not be used like Arduino Pin.

On Atmega328-AU is different, you can use Pin 9 like Arduino Pin 5. 

Your test code can be like this:
void setup() {
    pinMode(5, OUTPUT);
    digitalWrite(5, HIGH);
}

void loop() {
}