Need IAP MCU

I'm looking for a MCU with something like:

- 8bit (ie, simple)

- internal flash, 8k, IAP

- VCC 3V3

- free dev tools

- low pin count

- low power consumption

what families should I consider?

Basically, my question is: which MCUs can do IAP?

Thanks

Reply to
aleksa
Loading thread data ...

What is IAP? Do you mean something like in-system programming? If that's the case, then I can't think of any flash-based microcontrollers that /don't/ support in-system programming.

Based on the rest of your requirements, I'd go for an AVR.

Reply to
David Brown

define "free"

define "low"

Freescale 9S08, one pin for BDM access.

You might want to spend money for tools. I use a P&E BDM interface with NoICE and the Cosmic compiler (the latter should exist in a free limited version). There are free BDM circuits around working with CodeWarrior.

Oliver

--
Oliver Betz, Munich
despammed.com is broken, use Reply-To:
Reply to
Oliver Betz

Always risky to guess requirements, but he may be looking for one that can reprogram itself during execution. The NXP LPC ARM7s (and others, I'm sure) do this by executing out of RAM while diddling with the flash sectors. I've never had the need to do this but the process is outlined in the applicable User Manuals. Basically write your handler into a section of RAM, define the necessary function pointer, and call through that function with particular parameters.

--
Rich Webb     Norfolk, VA
Reply to
Rich Webb

case, then I can't think of any flash-based

IAP - in application programming. You can program the flash while your code is executing in the final product. Can AVR do that?

Reply to
aleksa

Yep.

Or, flash routines can be stored in a separate, internal (boot)-ROM.

Reply to
aleksa

I need only 3 I/O pins. The MCU should be battery oriented.

Reply to
aleksa

snipped-for-privacy@lyse.net...

that's the case, then I can't think of any flash-based

Yes, but you might need to run in bootloading mode. Basically, you write your own bootloader.

Reply to
linnix

snipped-for-privacy@4ax.com...

Do you mean external? How big is your total ROM space?

Reply to
linnix

the case, then I can't think of any flash-based

The answer is ... it depends on what you really want to do.

It is very unusual to want to update application code while the application is running. It is certainly /possible/ to do that, but it is much harder to do properly (no matter what chip you use).

The usual way to handle IAP (to use your term) is to split the code into two parts - a bootloader/updater, and the main application. The bootloader is kept simple - it should be able to communicate in some way so that it can receive program updates, it should have minimal control of the system (such as making an LED blink and keeping the outputs in a fail-safe setting), and it should be able to verify and start the main program. The main program is what does the normal work.

So when you want to update the program, you put the system into bootmode or update mode, the bootloader reads in the new program, burns it to flash, and starts it up.

Lots of microcontrollers, including the AVR, support this model for updating. Typically the flash is split into two parts - a small boot section, and a main section, with the ability to read and run code from the boot section while erasing or programming the main section.

If you want to download a new version of the main application program while the older version is still running, it's a lot more effort. You still need a boot program that will be your safety net - it starts on bootup, and verifies that the main program is good to go, and can handle an update if needed (such as if there is a power failure during the main update - always take into account that the update can fail). You then need to be able to run one copy of the main application while downloading and burning the new version.

This almost certainly means external memory of some sort, unless your programs are so small that they can run entirely from internal ram, and it pretty much rules out the AVR.

Once the new program is burned, you re-boot into the new program.

If you want to update the application without doing any sort of reboot, you've got an even bigger challenge. It is possible (look up ksplice for an example), but there are almost certainly better ways to handle your project.

In short, use an AVR with a bootloader. It will be the smallest, cheapest and easiest solution.

Reply to
David Brown

8K flash and low pin count are generally incompatible due to die size. NXP Cortex M0 or M3, ATMega (If you can get them), PIC16 (most) /18F(all) will all do the above, although the free version of the PIC compiler is somewhat sucky.
Reply to
Mike Harrison
2010-11-02 14:34, aleksa skrev:

ATtiny25 has

8 kB Flash, In Application Programming 3V3 AVR Studio + WinAVR is free of charge 8 pins low power consumption.

If you need more pins, then there are bigger devices in the AVR family. ATmega88PA would be one choice.

Best Regards Ulf Samuelsson

Reply to
Ulf Samuelsson

That would be the Tiny85, the T25 has 2K

Reply to
Mike Harrison
2010-11-06 18:38, Mike Harrison skrev:

Yes, Usually I recommend people to read what I mean, and not what I write, and this is certainly true in this case...

BR Ulf

Reply to
Ulf Samuelsson

The Renesas chips R16C/R32C can program the flash while running from RAM (which is hardly a restriction.) In my interactive Forth development environment (see my site below) I use that to store a turnkey system in flash, that is detected and executed with the next reset. Flash can be erased as well.

--

--
Albert van der Horst, UTRECHT,THE NETHERLANDS
Economic growth -- being exponential -- ultimately falters.
 Click to see the full signature
Reply to
Albert van der Horst

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.