I've designed a custom circuit board using an ATmega328P, which I intend to use for writing data to an SD card via a reader/writer module. When I initially tested the SD card reader/writer with an Arduino Uno, it worked flawlessly. However, running the same code on my ATmega328P setup results in the SD card reader failing to initialize.
I've attached my current schematic for reference. Initially, I included a logic level converter for the signal pins but removed it after realizing that the Arduino Uno didn’t require one. During troubleshooting, I manually checked the continuity between each SD card reader pin and the corresponding ATmega328P pin (for instance, confirming that MISO connects to pin 12, or PB4 on the ATmega328P when it’s plugged into the Arduino).
I've verified that all connections on the circuit board are correct and have continuity. Using a multimeter, I've also confirmed that the SD card writer is receiving 5V both when connected to the Arduino (where it works) and to my custom circuit board (where it doesn't). I’m confused about the difference between the Arduino and my circuit board. I’ve attached an image showing how I connected the SD card reader/writer to the Arduino. The image has a slightly different SD card reader/writer, but the pin layout remains identical (SCK and CLK are the same).