Showing posts with label USB. Show all posts
Showing posts with label USB. Show all posts

Thursday, May 19, 2011

Intelligent simple peripherals

This week I once again wrote an interrupt service routine for a UART to do some serial communication. Actually I didn’t have to write a whole lot, because the receiver part had already been done by someone else, but the code for transmitting data under interrupt control was missing. I already had this code in another project and porting it was easy and quick, but then I started thinking.

Like me, probably thousands of programmers all over the world are doing this every day, which is a waste of time and resources. Of course we all try to reuse code as much as possible, but with micro-controllers getting more and more advanced, why don’t the silicon vendors simply implement the driver in the peripheral, in silicon? I mean, how many people do use the UART for other things than simply sending and receiving data? OK, we see more and more 16550 compatible UARTs, so drivers are easily found, but then again, why not put it in a ROM for the programmer’s convenience? All it has to do is to read data from a buffer and write data to it, all under interrupt control of course. An intelligent peripheral like that would save some code space, but most importantly, it would save lots of programmer’s time.

Such an intelligent peripheral would have a pretty simple interface: some registers to set up circular rx & tx buffers and the communication parameters, registers to read/write a block of data and some status registers to check for errors. The user only has to supply a block of RAM for the buffers. This is what most of us implement in our code anyway. For backward compatibility they should keep the traditional interface too, that way everything is possible.

Similar peripherals for other protocols could be integrated as well, like I2C or SPI.

The typical ISR for I2C is rather complicated and big, and is therefore prone to many bugs. Many software developers are struggling to get it working properly, so it would be a great service to them if the driver was already in the chip. I am not pleading for a full blown on-chip operating system, but some simple drivers that will take care of the most common tasks sure would be nice.

So you silicon vendors reading this please do give it a thought. I appreciate the integrated USB drivers, but don’t stop there. Why don’t you make things even better by adding hardcoded drivers for “simple” peripherals too?

Thursday, May 20, 2010

USB 2.0 drop-in for legacy DB9 RS232 connector

It is official! FTDI launches a USB 2.0 module to replace DB9 RS232 connector on legacy boards.


I was given a sneak preview of this module during the Embedded World show at Nuremberg (see here) and immediately felt that this was going to be a killer product.

The module features a standard USB “mini-B” type connector in a module that fits the PCB footprint of a standard 9-pin DB9 connector. The module offers a fast and simple method to add USB 2.0 connectivity to any existing PCB board that has a DB9 RS232 connector.

Two modules are available to replace male or female DB9 connectors. They contain all the electronics needed to carry out the conversion between RS232 and USB. The modules are based on the popular FT232R USB 2.0 to serial UART converter IC from FTDI, which handles the USB protocol conversion. The FT232R device converts from USB to a serial UART interface, which is then level-shifted into RS232 signal levels, within the module. Power to the module is supplied by the USB connection. The modules support a maximum transfer rate of 1 Mbits/s on the RS232 interface.


The DB9-USB-RS232 modules are supplied complete with FTDI's royalty free drivers, which enable a device to be integrated as an additional, (virtual) COM port into an existing software application. The range of drivers includes Microsoft WHQL certified drivers for Windows based operating systems, drivers for Linux and Mac OS operating systems.

Pricing for DB9-USB-M (male) and DB9-USB-F (female) starts at $22.04 for single quantities.

Further information on the DB9-USB-RS232 modules is available on the FTDI website.