Adding USB Interface to Low-Cost 8-Bit Microcontroller

Hi,

I work for a company that produces low-cost consumer electronics that use

8-bit microcontrollers. These have the standard 8-bit whistles, like SPI, SCI, etc.

We've kicked around the idea of allowing customers to re-FLASH our products. The re-FLASHing would be facilitated by code we write that runs in the microcontroller and reprograms a portion of the FLASH.

We have a handle on digital signatures and what would be required to prevent a customer from "forging" a software load.

However, what is required to implement a USB interface in the product (for an 8-bit microcontroller), and what is required as far as a driver on the PC side? The goal would be that we distribute a re-FLASHing application to the customer that runs on the PC. They would run this application with a USB cable connected from the PC to our product.

What all is required (hardware, driver development kits, etc.)?

Thanks for all.

Reply to
David T. Ashley
Loading thread data ...

An off the shelf solution:

formatting link
uses FTDI chip and drivers.

have many other solutions at:

formatting link
which may be worth looking at.

Cheers Don...

--
Don McKenzie

Site Map:            http://www.dontronics.com/sitemap
 Click to see the full signature
Reply to
Don McKenzie

I,

s.

nt

PC

the

B

The Microchip USB PICs are quite easy to use. It should be possible to reflash the application via the USB connection.

Leon

Reply to
Leon

My guess is that your only cost-effective way to get USB is going to be to replace the current micro with one that has USB. Even really simple dedicated USB chips like USBserial tend to internally be mask- programmed first-generation USB-enabled 8051 parts. So basically, by adding a second part you are putting two micros in the system; probably going to be cheaper to find one that does both jobs.

Reply to
cs_posting

Might it be acceptable for cutomers to have to buy a special cable to do it? If so, this could be a cheap USB-serial cable. This would avoid the cost overhead of adding USB just for updates.

Reply to
Mike Harrison

Lots.. you'll probably want to consolidate it on one controller, as others have mentioned. Freescale probably has the most mature USB support, but you can find many others (Microchip, etc.). It's even possible that some 32-bit ARM variants are cost-competitive. Best regards, Spehro Pefhany

--
"it's the network..."                          "The Journey is the reward"
speff@interlog.com             Info for manufacturers: http://www.trexon.com
 Click to see the full signature
Reply to
Spehro Pefhany

We'd like to avoid customers purchasing a special cable, but that approach may be preferable to carrying the cost of a special chip in every product. Thanks for the suggestion.

When you say USB-serial cable, which of these were you referring to:

a)A cable with effectively no active components (if this exists, I've never seen it), OR

b)A USB-serial converter, which normally has a little circuit board and some active stuff in it somewhere, i.e.

formatting link

I'm assuming (b), but if (a) exists I'd be grateful to know about it.

Thanks, Dave A.

Reply to
David T. Ashley

One with the circuitry shoved int he connector.

Of course you will also need a level translator in your project. Unless you can find and specify a cable with logic level output. Or, if you want to be sneaky, that can reliably accept logic level input from your device, and you play some game with passives to let your device handle RS232 input levels from the cable. And I think you have to remember to invert the signal someplace.

Reply to
cs_posting

At this late date I'm just adding my vote, but...

If I were in a hurry, or if my design team really didn't seem up to learning how to do the USB thing, then I'd consider one product rev with an FTDI chip or similar, talking serial to the other micro. It would probably be easier to implement the secure boot code, and it would give you a chance to learn half the problem then half again, but you'd spend a lot of money on the production floor.

Probably, I'd end up going to the microprocessors that include USB. There are plenty of inexpensive 8-bitters out there, so you should have a wide range to choose from. Your production volumes are high, so you can (or at least should be) able to afford the time to make it work. Heck, if your volumes are high enough you should be able to arm-twist the processor vendor into making it all work for you, and you'll just have to put it in.

--
Tim Wescott
Wescott Design Services
 Click to see the full signature
Reply to
Tim Wescott

Many cheap USB-serial cables only do +5V/0V output. Even for proper ones you only need a resistor.

Reply to
Mike Harrison

b)

formatting link

Don...

--
Don McKenzie

Site Map:            http://www.dontronics.com/sitemap
 Click to see the full signature
Reply to
Don McKenzie

I,

s.

nt

PC

the

B

MAX3240 seems like a good option. I'm planig to use in a project. It comes with a evaluation board to start with.

formatting link

Thanushan

Reply to
Thanushan

Others have already directly answered your question so I'm not going to. However, are you sure that you really need USB? You seem to have gone from requirements to that conclusion in a single bound so I can't help suspecting maybe there is a little tunnel vision here.

Many flash memory card formats have integral SPI interfaces - Secure Digital comes to mind. Since you already have an SPI interface you can add SD support to the hardware with little more than adding a connector assembly and making whatever modifications are necessary to the PCB and case. USB card readers are cheap - SD readers are under a fiver retail here in the UK, and that cost and the cost of the card itself are only necessary if the customer wishes to upgrade

- I suspect that will be a minority for most consumer devices.

Of course, you will need software on your device to read the card and reprogram the device accordingly, but you will need some software however you go, and that software will almost certainly be simpler than adding USB support. The software will be greatly simplified if you can dump your new flash image to the card as a raw device, rather than needing to deal with a filesystem layer.

--
Andrew Smallshaw
andrews@sdf.lonestar.org
Reply to
Andrew Smallshaw

"David T. Ashley" skrev i meddelandet news:yaqdnfLQ1Z1-SNDVnZ2dnUVZ snipped-for-privacy@giganews.com...

If you want to make this as simple as possible for the user, then you could implement a boot monitor with USB - CDC on your target. When such a device is connected to the USB bus a COM port appears on the PC, and you can use any application communicating over a serial port to send data to the target. Hyperterminal with X-Modem should always be available on a Windows PC.

The target should have USB and selfprogramming capability.

There are several AVR/AVR32/AT91SAM7 (ARM) circuits meeting those requirements.

If you do not mind the customers getting their own cable, then the AVR-ISP Mk II will let you reprogram the device using a 6 pin header using the SPI port. This will allow you to use cheaper parts, because they will not need USB, nor selfprogramming. The cable is $36 at Digikey

--
Best Regards,
Ulf Samuelsson
 Click to see the full signature
Reply to
Ulf Samuelsson

Andrew Smallshaw schrieb:

Another approach might be to use "good old" RS232 - it's the cheapest standard interface you can have with a small micro.

Those who want to do program updates either need a PC that still has an RS232 interface, or use one of the uncountable USB-RS232 converters that are around (and cheaper than you can implement an USB interface).

You don't have to care about all the USB stuff, and a simple serial protocol is easily implemented on any micro.

Tilmann

Reply to
Tilmann Reh

Having used the FTDI devices, may I respectfully suggest the MAXIM parts? MAX3420 for USB peripheral only, or MAX3421 for host and peripheral modes.

Reply to
Bill Davy

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.