Channels ▼

Al Williams

Dr. Dobb's Bloggers


January 23, 2012

I think I am almost ready to totally give up on the serial port. I know, I know, I'm in danger of turning into an old curmudgeon that clings to history. But I'm trying. It probably doesn't help that my first real job was with a company that made "multiport" adapters — 8 bit processors with 1488 and 1489 RS-232 circuits that could switch one serial port to another. I spent a lot of time working with serial ports.

There are tons of CPUs out there now that can easily do USB. The LPC11U14, for example, does a nice job. You can pick up an LPCXpresso board that has a debugger and the chip for about US$40. Its IDE (based on Eclipse) even runs nicely under Linux. I haven't used it for a USB project yet, but the ARM Cortex-M0 core is familiar and easy to work with.

The last few weeks I've been talking about Microchip, and it also has a number of USB-capable parts. I've done some PIC18F2550 development for USB (watch for it in an upcoming blog) and it is very simple to set up, as long as you don't mind using Microchip's (free) USB stack. The hardware can be as simple as the PIC chip, a USB connector, a few capacitors, and a crystal.

Regardless of the solution you select, it is easiest to use the built-in HID drivers that should come with your operating system. That way you don't need to write real drivers, you just write normal application code and you can read and write data with your USB device.

The only real drawback is that if you want to do anything serious you are going to need a USB vendor ID. That will set you back about US$1000. A bit rich unless you are really building something that is going to be produced in a reasonable quantity. Many vendors, however, will sublicense you to use their vendor ID, as long as you are using their chips. You still have to register so they can assign you a unique identifier (a PID). Be sure to read the fine print, however. For example, Microchip's program allows you to produce up to 10,000 devices. If you exceed that, they expect you to get your own vendor ID. As you might expect, the vendors will insist you only use their ID with their CPUs. Can't blame them for that.

Related Reading

More Insights

Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.