2

I'm trying to make a standalone arduino board with an OLED display using an Atmega328p. I never tried to make such a board using SMD components. I've soldered everything together except the OLED display itself. I've uploaded the ArduinoISP sketch to an Arduino Leonardo, and hooked up the SPI pins on my board there. But I simply can't upload anything, I've got 0x000000 as the device signature. I've checked all the connections from the Atmega to the exposed pins themselves, and all seems to be correct with no short circuits.

I'm a bit confused if I put C1 and C3 close enough, could those be the problem? Or is the atmega itself dead? Or did I missed something important?

Wiring between the board and the Leonardo is the following:

Board(H1 header)         Leo
1(reset pin)<----------> Pin 10
2(MISO)     <----------> Pin 12
3(MOSI)     <----------> Pin 11
4(SCK)      <----------> Pin 13
-------------------------------
Board(H2 header)         Leo
1(VCC)<----------------> 5V pin
2(GND)<----------------> GND pin

I've put a 10uF cap between GND and RESET on the Leo.

In the stock ArduinoISP sketch, the #define USE_OLD_STYLE_WIRING line is uncommented. I've tried both Arduino as ISP as a programmer (which didn't work), and Arduino as ISP (Atmega32U4) which gave me the aforementioned signature.

As for the board, I've tried selecting both Arduino Duemilanove or Diecimila/ATmega328P and Arduino Pro or Pro Mini/ATmega328P (5V, 16MHz)

main board PCB

9
  • 1
    @gbg I've tried that as well, I've got signatures like 0xFF0000, 0xF00000, kinda randomly
    – Aerandir
    Commented Aug 25, 2021 at 11:52
  • 1
    Not too sure about the crystal. Seems like the ground for the caps is only grounded via the MCU (I can't see a direct trace to ground). Is it oscillating?
    – Mat
    Commented Aug 25, 2021 at 15:00
  • 1
    @Mat it is connected to ground (there is a via above pin 6 of the MCU), but I can't even flash a bootloader to the Atmega, so it should only use the internal oscillator
    – Aerandir
    Commented Aug 26, 2021 at 10:05
  • 1
    One thing I have found: new out-of-the-box chips need to be treated more gently than ones that have been programmed once already. You need to slow down the programming to compensate for it running from a relatively slow (1MHz) internal clock.
    – Majenko
    Commented Aug 26, 2021 at 11:09
  • 1
    For Arduino Leonardo, SPI only break out at the ICSP header, not like Arduino Uno that is available at pin 11 - 13. See arduino.cc/en/Reference/SPI
    – hcheung
    Commented Aug 28, 2021 at 2:09

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.