Flash Atmega 328 without Arduino Dock



  • Hello togehter,

    i try to flash a hex file to a Atmega328 (installed Arduino Bootloader) without the use of the Arduino IDE.
    First try: Use Arduino Dock --> send hex file to omega --> flash .hex file --> Flash works
    Next step: Take this omega and place it on an Onion Breadboard Dock and wire a Arduino Mini based on this instruction: https://docs.onion.io/omega2-docs/arduino-dock-2.html. Try to flash again --> 0_1572705901416_42b902d5-65f9-48e4-b538-70c43bafdafa-image.png

    What could be the problem?
    ResetPin: The Onion Arduino Dock uses a transistor to pull the Atmega Reset to Ground but Omegas Pin 19 goes to 0V shortly after starting the flash. So I thougt it should work without that transistor. Additional i tried to push Reset by hand.

    SPI Connection: I do not use any level shifter but run the mini on 3.3V.

    Atemga328: Is there a special script running on the atmega on the Onion Arduino Dock?

    Do you have a hint for me?

    Thanks.
    Kind regards.



  • @Last-Call said in Flash Atmega 328 without Arduino Dock:

    i try to flash a hex file to a Atmega328 (installed Arduino Bootloader) without the use of the Arduino IDE.

    The Arduino Bootloader doesn't do anything here.

    Next step: Take this omega and place it on an Onion Breadboard Dock and wire a Arduino Mini based on this instruction: https://docs.onion.io/omega2-docs/arduino-dock-2.html.

    I think you are talking about the "Omega to ATmega MCU Connections" table.
    You have to connect only these pins now:

    Omega2 pins    ATmega pins
    GPIO 15        SPI SCK
    GPIO 16        SPI MOSI
    GPIO 17        SPI MISO
    GPIO 19        /Reset via an Open Collector Inverter (eg. an NPN transistor;)
    

    ResetPin: The Onion Arduino Dock uses a transistor to pull the Atmega Reset to Ground but Omegas Pin 19 goes to 0V shortly after starting the flash. So I thougt it should work without that transistor. Additional i tried to push Reset by hand.

    Connect GPIO 19 to /Reset without an OC inverter / NPN transistor is not a too good idea.
    If configure GPIO 19 to be an output and set it to High and short the /Reset to GND
    then you create an overcurrent condition on the GPIO 19 and it may be destroyed.

    If you - even so - want to connect GPIO 19 to /Reset directly then you have to modify the '/usr/share/arduino-dock/avrdude.conf' file.

    Additional i tried to push Reset by hand.

    I think you should let the avrdude to manage the ATmega's /Reset pin.

    SPI Connection: I do not use any level shifter but run the mini on 3.3V.

    If the Vcc of an ATmega328P is 3.3V then the clock frequency can be max. 10..11 MHz.
    Although - if you are a lucky man - then your Arduino will work @3.3V also with a 16 MHz Xtal.

    Atemga328: Is there a special script running on the atmega on the Onion Arduino Dock?

    No - avrdude and all related scripts are running on Omega2.

    Good Luck!



  • Hey György,

    oh man... that wasn´t worth to open a topic... I just grab a NPN and it works. Thank you very much.


Log in to reply
 

Looks like your connection to Community was lost, please wait while we try to reconnect.