OpenSprinkler Forums OpenSprinkler Unified Firmware Programming a new blank atmega644 with firmware

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #36429

    brucep
    Participant

    Hi,

    I’m in the process of building the opensprinkler 2.2u rev NOV/14 unit. I am having trouble writing the firmware to the atmega644.

    When I plug an assembled board into my pc (win 7 32bit) it installs the driver CH340 USB to serial COM16, but following the instructions for writing a complied firmware do not seem to be working. It compiles OK, but avrdude cannot find tinyISP. I’ve tried avrdude by itself at command line, but the same thing happens. At first I thought it was because on the schematic it shows X0 as 12MHz, but in the assembly instructions it is shown as a 16MHz Xtal, so I changed that, but to no avail. The atmega is getting all voltages OK, I’ve tried multiple brand new atmega’s, and still nothing. I’ve read reference to the fact that the driver should show up as a usbtinyisp, like we used on the gen 1 versions, but cannot seem to make it happen.

    Has anyone else had a similar issue?

    Any help appreciated.

    Thanks, Bruce

    #36431

    Ray
    Keymaster

    For programming a blank ATmega644, please check this thread:
    https://opensprinkler.com/forums/topic/question-about-blank-atmega644-programming/

    In short, a blank ATmega644 does not have a bootloader, and hence you will need to program the bootloader to ATmega644 first (through the 2×3 ISP headers, using an ISP programmer such as USBasp or USBtiny). This is necessary if you want to upload a program through OpenSprinkler’s USB port. On the other hand, if you already have an ISP programmer, you can directly upload the firmware to the microcontroller without going through OpenSprinklers USB port.

    #36433

    brucep
    Participant

    Hi Ray,

    Thank you for the fast reply. I read the message Note that OpenSprinkler does not use a bootloader, so please do not upload any bootloader to it.”  on the firmware update page, and thought that there was no boot loader required.  I’ll program optiboot using ISP port using a  USBasp. Can you please confirm that the 2.2u Nov/14 hardware uses a 16MHz Xtal for the atmega (X0).

    Thanks again,

    Regards, Bruce

     

    #36462

    Ray
    Keymaster

    Sorry about the confusion — those instructions (“Note that OpenSprinkler does not use a bootloader, so please do not upload any bootloader to it”) are outdated. It was for OpenSprinkler 2.0 which doesn’t use bootloader. All later versions (2.1, 2.2, 2.3) use a bootloader. Still it’s good to be cautious about the bootloader because you should be explicitly aware of this bootloader you are uploading.

    Note that OpenSprinkler 2.2 uses optiboot bootloader (only OS 2.1 uses USBasp). The optiboot bootloader for ATmega644 can be found at:
    http://code.google.com/p/optiboot/downloads/list

    #36668

    brucep
    Participant

    Thanks Ray,

    Got it all sorted, and working. I’m using a 16MHz Xtal as X0 (on HW ver 2.2/nov) Is this correct? I am a bit confused as the schematic shows 12Mhz.

    Cheers,

    Bruce

    #36736

    Ray
    Keymaster

    Yes. The 12MHz shown in the schematic is wrong (I must have forgotten to change it from OS 2.1 schematic).

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.

OpenSprinkler Forums OpenSprinkler Unified Firmware Programming a new blank atmega644 with firmware