OpenSprinkler › Forums › OpenSprinkler Unified Firmware › Programming a new blank atmega644 with firmware
- This topic has 5 replies, 2 voices, and was last updated 9 years, 8 months ago by Ray.
-
AuthorPosts
-
April 2, 2015 at 6:39 am #36429
brucepParticipantHi,
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
April 2, 2015 at 7:38 am #36431
RayKeymasterFor 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.
April 2, 2015 at 8:09 am #36433
brucepParticipantHi 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
April 4, 2015 at 10:08 am #36462
RayKeymasterSorry 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/listApril 13, 2015 at 8:07 pm #36668
brucepParticipantThanks 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
April 15, 2015 at 10:02 pm #36736
RayKeymasterYes. The 12MHz shown in the schematic is wrong (I must have forgotten to change it from OS 2.1 schematic).
-
AuthorPosts
- You must be logged in to reply to this topic.
OpenSprinkler › Forums › OpenSprinkler Unified Firmware › Programming a new blank atmega644 with firmware