Show Posts
Pages: 1 ... 23 24 [25]
361  Using Arduino / Microcontrollers / Re: Optiboot on various boards on: March 22, 2011, 06:06:11 pm
My current optiboot.c and makefile are attached.

OK, excellent, thanks.  Reassuringly my sources are almost identical, even down to the choice of version numbers!  By the way, I think this code is more recent than that used to build the binary in optifix?

It looks like you've found a way to get Make to append the version digits to the binary, although I can't get this to work myself just yet.  I'm using a Perl script to modify the .hex file after compilation, which is not so ideal for Windows and Mac users.  The 0x2f memory lock seems to work a treat, and I can read out the bootloader memory and see the version digits.  I have used just one byte to store the version numbers (as 2 hex digits), with another byte being 'O' to identify Optiboot.

Have you tested this code on an 8MHz platform?  My 8MHz ATmega328 Pro-Mini boards wouldn't talk at 115200 baud, but are perfectly happy at 57600.

Anyway, this is starting to look pretty ship-shape.  Any thoughts of an "official" release?  The author and maintainer of Optiboot seems to have gone quiet -- is anybody in touch with him?
362  Using Arduino / Microcontrollers / Re: Optiboot on various boards on: March 22, 2011, 08:01:48 am
Drew, you can find the other source files on the Optiboot project page:
363  Using Arduino / Microcontrollers / Re: Optiboot on various boards on: March 22, 2011, 04:10:10 am
Thanks for those.  I'll check them against the source version I'm using later today.

Meanwhile I have now got a patched Optiboot running on both 5V-16MHz and 3.3V-8Mhz Pro-Mini boards.  In order to get the 8MHz version working I needed to compile for a reduced upload baud rate.  The code includes your size-reduction patch and sketch amnesia patch.  I have also made the boot-loader readable and added a version number byte.

Now I need to do a bit of testing to check everything works as it should.  Does any kind of check-out sketch exist already?  If anybody else wants to try these bootloaders I'm happy to send them.  I'm using the excellent "optifix" sketch as an ISP, which is very easy to use and avoids the auto-reset problem.
364  Development / Other Software Development / Re: Compiling optiboot within the arduino environment. on: March 21, 2011, 09:35:10 pm
Thanks very much for making this patch!  I have now been able to compile Optiboot with the IDE 0022 tools running under Windows 7, and get a .hex file which matches the one in the Optiboot repository.  I did have to make a couple of small adjustments to the diff file (see below) to match the current version of the Makefile, and add the '-nostdlib' flag to LDFLAGS (as explained in Optiboot issue #1).

And if I add the fix at I get a hex file which matches that in your excellent Optifix sketch.

The next things I will try are your size-reduction patch from, and an 8MHz version of Optifix.


--- westfw-Makefile.diff Tue Mar 22 03:28:25 2011
+++ tim-Makefile.diff Tue Mar 22 03:17:06 2011
@@ -72,13 +70,13 @@
  # Override is only needed by avr-lib build system.
  override CFLAGS        = -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET) -DF_CPU=$(AVR_FREQ) $(DEFS)
--override LDFLAGS       = -Wl,$(LDSECTION) -Wl,--relax -nostartfiles
-+override LDFLAGS       = -Wl,$(LDSECTION) -Wl,--relax -Wl,--gc-sections -nostartfiles
+-override LDFLAGS       = -Wl,$(LDSECTION) -Wl,--relax -nostartfiles -Wl,--gc-sections
++override LDFLAGS       = -Wl,$(LDSECTION) -Wl,--relax -nostartfiles -Wl,--gc-sections -nostdlib
 -OBJCOPY        = avr-objcopy
 -OBJDUMP        = avr-objdump
 +OBJCOPY        = $(GCCROOT)avr-objcopy
 +OBJDUMP        = $(call fixpath,$(GCCROOT)avr-objdump)
- # 20MHz clocked platforms
- #
+ # Test platforms
+ # Virtual boot block test
365  Using Arduino / Microcontrollers / Optiboot on various boards on: March 20, 2011, 12:51:25 pm
I have just installed successfully the Optiboot bootloader on an Arduino Pro-Mini 5V.  I used Bill Westfield's Optifix sketch running on an Uno as the programmer.

Optifix contains a number of important bug-fixes not yet included in the official Optiboot package.  In fact the Optiboot project maintainer seems to have gone quiet.  I hope this excellent project will not fall into disrepair.

Bill, if you're reading this, could you be persuaded to publish the patched source that you used?  I would like to put Optiboot on some 3.3V Pro-Mini boards, and I think it will need to be recompiled to account for the 8MHz oscillator.  I would also like to experiment with including a readable version number.
366  Using Arduino / Installation & Troubleshooting / Re: Garbled Serial on 328Pro Mini 5v on: March 15, 2011, 07:46:46 pm
I am thinking it might not be the sketch, but, the FTDI/USB board that is used between the Ard and the cpu. Perhaps a bad driver. 
Can you use your Mega1280 board to test the serial output coming from the Pro-Mini?
367  Community / Bar Sport / Re: Fantastic! on: March 15, 2011, 01:19:27 pm
Here's a bigger picture:
368  Community / Bar Sport / Re: Fantastic! on: March 15, 2011, 01:18:00 pm
Showing off?  I doubt the grizzled and scarred programmers of PIC-assembler will be impressed by anything I can do with my Arduino board.  However they might be jealous that a soft-skinned C-programmer like me can tread on their toes.

But since I'm showing off, here's a picture of the GPS-clock.  Above 1kph it switches to display speed, but you'll have to take my word for it.  As you can see, right now the mobility is rather limited.  Testing involves waving the GPS around on the end of its cable.

The little bit of electronics in the background is to convert RS232 to TTL logic levels, and to switch the GPS on if no data is detected.
369  Community / Bar Sport / Fantastic! on: March 14, 2011, 09:14:45 pm
I just wanted to say a huge thank-you to everybody that made and continues to improve the Arduino platform.  After struggling with other hobbyist development boards, I never believed microcontrollers could be made so easy and accessible.  And I bet there are plenty of professionals for whom Arduino is the quickest way to get work done.

I love the ease of writing code in a powerful language I know well, and watching GCC squash it down to a few kilobytes.  In the week since I got my first Uno board I have built
 - a laser-gated automatic camera trigger
 - a GPS clock and speedometer
 - and innumerable LED flashers with increasingly esoteric algorithms

So "thanks", everybody.  For the first time in years, electronics is fun again!
370  Using Arduino / Installation & Troubleshooting / Re: Powering Uno from regulated +5VDC Safe/Possible? on: March 06, 2011, 06:52:37 pm
Whilst we're on the subject of bypassing the regulator:
I'm running an Uno board right now with a 3.0V supply connected to the 5V pin.  Technically the ATmega328 chip requires at least 3.8V to run at 16MHz, but mine seems happy enough.  As others have mentioned above, it is essential to disconnect the external power before connecting to USB.
371  Using Arduino / Installation & Troubleshooting / Re: 3.3V vs 5V boards on: March 05, 2011, 08:02:08 am
Right-ho.  I've convinced myself that the only potential problem is peripheral devices connected to the 3.3V Arduino which might be intolerant of 5V coming from the FTDI interface.  But in any case the 3.3V FTDI interface cannot supply much current, so peripherals should be disconnected anyway during programming.

So I shall try it and report back here.  And if it doesn't work, it appears that the FTDI interfaces can easily be altered from 5V to 3.3V.
372  Using Arduino / Installation & Troubleshooting / Re: Frustration with only occasional uploading on: March 05, 2011, 07:52:01 am
What OS are you running?  Your comments match my experiences with an Uno board and a PC running Ubuntu 9.04 and Arduino IDE 0022.  If it works, it only works for a short while before giving errors such as "Port in use" or "Port not found".  Digging through the forums seems to indicate that libraries from Ubuntu 11.04 are needed, though I haven't tried this yet.

Meanwhile I've had no problems at all with Windows 7 or XP.
373  Using Arduino / Microcontrollers / Re: Using empty UNO board to program external ATmega328 on: March 05, 2011, 06:47:07 am
Can this technique be used to program an ATmega328 with a non-Uno bootloader?
For example, can I use an Uno board (minus microcontroller chip) as a USB-to-Serial programming interface for something like the Arduino Pro-Mini?  (The Pro-Mini board uses the ATmegaBOOT, whilst the Uno uses Optiboot, AFAIK)
374  Using Arduino / Installation & Troubleshooting / Re: 3.3V vs 5V boards on: March 04, 2011, 12:45:28 pm
Isn't it the same ATmega168 chip on both 3.3V and 5V boards?  The chip spec says it can run at 1.8 to 5.5V, although it needs lower clock speeds at lower voltages.  So if I apply 5V to the Vcc pin of a 3.3V Pro-Mini board, it should be ok?
375  Using Arduino / Installation & Troubleshooting / 3.3V vs 5V boards on: March 04, 2011, 12:23:57 pm
Hello everybody, I'm new to the Arduino community, after finding PIC too cumbersome for non-professional use.  Right now I have an Uno board and am extremely pleased with it.  For embedding in projects the Pro-Mini looks more suitable, but I'm a little uncertain about the programming requirements of the smaller board.

The Pro-Mini board comes in 3.3V and 5V versions, and appear to differ only in clock-rate and the voltage-regulator.  Likewise the recommended FTDI interfaces come in 3.3V and 5V flavours.

Now, do the voltages of the Arduino board and the FDTI interface need to match?  I understand that the "5V" board is clocked at 16MHz and therefore mightn't run properly when powered by a 3.3V interface.  But is there anything wrong with programming a "3.3V" board with a 5V interface?
Pages: 1 ... 23 24 [25]