Open Sprinkler hw ver 1.0 with 1.8.1 Fw does not always startup

115 views
Skip to first unread message

Christopher Gillanders

unread,
Oct 13, 2012, 7:30:16 AM10/13/12
to rays...@googlegroups.com
Ray, I just updated my firmware to 1.8.1, and the first time it powered up fine, but after that it does not seem to initialize on power.  If I press the reset button two or three times, it will come up.  When I cycle power, the green LED lights, and the LCD has a faint row of boxes across the top.  Any ideas?

Chris.

Ray

unread,
Oct 14, 2012, 9:08:45 PM10/14/12
to
Hi Chris,

I figured out the problem: it's because v1.0 and v1.1 are programmed with the optiboot bootloader, which uses different fuse bits and causes the reset procedure to jump to the wrong program address. The fix is to plug in an isp programmer (or plug the chip into the opensprinkler usbtiny programmer) and run the following command:

avrdude -c usbtiny -p m328p -B 250 -F -U lfuse:w:0xff:m -U hfuse:w:0xd1:m -U efuse:w:0x06:m

double check the command and make sure all the numbers are correct. This should fix the problem. You don't need to re-flash the firmware (you can if you want). I will post an update soon. Let me know if this works or not. Thanks.

Christopher Gillanders

unread,
Oct 17, 2012, 12:33:39 PM10/17/12
to rays...@googlegroups.com
Ray,  Thanks!  I have not tried it yet, but this makes sense, so I am sure it will work.  Where can I find a description of fuse bits, just for better understanding?


On Sunday, October 14, 2012 9:08:20 PM UTC-4, Ray wrote:
Hi Chris,

I figured out the problem: it's because v1.0 and v1.1 are programmed with the optiboot bootloader, which uses different fuse bits and causes the reset procedure to jump to the wrong program address. The fix is to plug in an isp programmer (or plug the chip into the opensprinkler usbtiny programmer) and run the following command:

avrdude -c usbtiny -p m328p -B 250 -F -U lfuse:w:0xff:m -U hfuse:w:0xd1:m -U efuse:w:0x06:m

double check the command and make sure all the numbers are correct. This should fix the problem. You don't need to re-flash the firmware (you can if you want). I will post an update soon. Let me know if this works or not. Thanks.

On Saturday, October 13, 2012 7:30:16 AM UTC-4, Christopher Gillanders wrote:

Ray

unread,
Oct 17, 2012, 12:44:37 PM10/17/12
to rays...@googlegroups.com
You can take a look at the AVR fuse calculator first:
select ATmega328p as the mcu. This will give you the complete list of fuse bits options on ATmega328p. Basically the fuse bits allow you to set the mcu clock source, bootloader sector, watchdog timer, brown-out reset, and so on. For details you really have to look at the mcu's datasheet.

Warning: be very careful if you want to re-program the fuse bits. Make sure you understand the changes you are making. It's easy to mess up with AVR chips if you program the fuse bits wrong. The common mistakes are selecting the wrong clock source, or disabling reset pin -- these can make the mcu fail to start, or disable ISP programming capability. The only way to recover is to use a high-voltage (12V) programmer. I've learned my lessons. So be careful.

Jason Lewis

unread,
Dec 4, 2012, 4:12:23 AM12/4/12
to rays...@googlegroups.com
I'm also having the same problem. Did you try this out?

Jason

Jason Lewis

unread,
Dec 4, 2012, 5:17:06 AM12/4/12
to rays...@googlegroups.com


On Tuesday, 4 December 2012 20:12:23 UTC+11, Jason Lewis wrote:
I'm also having the same problem. Did you try this out?

Jason



To answer my own question. Yes, it does work. Fuses above are correct and solves the problem.

Jason
Reply all
Reply to author
Forward
0 new messages