OpenSprinkler Forums OpenSprinkler Unified Firmware Question about blank Atmega644 programming…

  • This topic has 11 replies, 3 voices, and was last updated 9 years ago by Ray.
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #34859

    Radostin
    Participant

    Hi to all!

    Is there any tutorial regarding how to program a blank atmega644 whit optiboot or directly the whole hex firmware.I want to build by myself all the hardware…I’ve search all over the place but didn’t find any info about.

    I don’t think it will work out of the box trough  normal firmware update,because of no bootloader inside the atmega…

    So waiting for further steps or instruction how to do it by myself…

     

    thanks in advance for helping me out 😉

     

    #34877

    Ray
    Keymaster

    You will need an ISP programmer (such as USBasp, USBtiny, AVRisp). Flash the optiboot bootloader to the microcontroller through the ISP pins on the circuit board. Once the bootloader is flashed, you can program the microcontroller through the USB port.

    #34885

    Radostin
    Participant

    Thank you for the answer Ray!

    My second question is where can I find latest 2.2u part list(BOM) and if possible smt version also …

     

    Thanks again for help!

    #34903

    Ray
    Keymaster

    The hardware design files are generally released in Github. Here is the direct link to version 2.2:
    https://github.com/rayshobby/opensprinkler/tree/master/OpenSprinkler%20Controller/hardware/v2.2

    The BOM is not included, but you can generate the BOM from the schematic using the EagleCAD software.

    #35606

    Radostin
    Participant

    Hello again from me!!!

    I’ve builded my own opensprinkler hardware based on 2.2 smt variant.Still don’t have usb serial chip CH340G on my board(ENC28J60 also still  missing) . I flashed  trough ISP directly into the blank atmega644p this file  firmware2.1.2.hex using usbtiny programmer and avrdude with this command:avrdude -c usbtiny -p m644p -U flash:w:firmware2.1.2.hex

    But after this,nothing happened;( Is this a right procedure or I’m missing something?I didn’t find any info how to flash first the bootloader(optiboot),so i decided to go straight to the firmware…Any help,tutorial  will be very helpful.

    Thanks in advance!

     

    #35608

    Ray
    Keymaster

    Try this:
    avrdude -c usbtiny -p m644p -U lfuse:w:0xFF:m -U hfuse:w:0xD6:m -U efuse:w:0xFF:m
    A blank ATmega chip is set to run on internal 1MHz clock. The above sets the fuse bits to use external crystal clock. Since you don’t have CH340G yet, you don’t need to flash the bootloader.

    #35611

    Radostin
    Participant

    Thanks Ray,all working now,missed the fuses.Waiting tomorrow  for ENC28J60,because now Opensprinkler hangs on Connecting…Some times if i touch with finger some points it goes to the menu…

    If you have time,can you tell me how to burn bootloader with avrdude and witch file from where to use?

    Thanks again for the support!!!

    PS:When I get all things working will post pictures/videos of building the controller,all by myself,except pcb manufacturing;)

    #36075

    Radostin
    Participant

    Hi!

    A long awaited usb ic CH340G has arrived.If possible can you guide me please,what I must flash into atmega trough ISP,so in future to use usb for upgrading FW.For now my PC recognizes usb device,drivers are installed,FW update program is recognizing COM port,but can not flash new FW.What bootloader i must use and if possible the command line for avrdude!

    Thank you again for helping me out!

    #36158

    Anonymous
    Inactive

    Hy,

    I would like build a 2.1 hardware version OS, at first I wired in a beardboard just the Atmega644 (I attached that I bulit) and connected wia USB to my PC. the Win says: unknown device, I pushed an released the B2 button, as you offered, but i can’t install the correct USBasp driver

    My Atmega644 is brand new, I newer upload any bootloaders.

    It’s needed to upload an USBasp bootloader first via ISP, or what can I do for working?

     

    Attachments:
    #36168

    Ray
    Keymaster

    A blank ATmega644 does not come with bootloader, you will need to use an ISP programmer to program a bootloader to it. On the other hand, if you already have an ISP programmer, you can directly program the firmware to the microcontroller without going through OpenSprinkler’s USB port.

    #36563

    Anonymous
    Inactive

    Dear Ray, sorry for late feedback. With your instruction I uploaded the FW. Thanks for your help. If I can, I will help you to translate to hungarian language.

    #36583

    Ray
    Keymaster

    OK cool. About translation, sure you can help. The translation is crowdsourced by using Get Localization available at:
    http://www.getlocalization.com/OpenSprinkler/
    I think Hungarian is already one of the supported languages, but you can help validate the translation.

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

OpenSprinkler Forums OpenSprinkler Unified Firmware Question about blank Atmega644 programming…