It's often useful to connect a microcontroller's serial port to a host computer for debugging. Years ago, one might even use an actual serial terminal for this sort of work, but nowadays a terminal emulator program on a PC is much more commonly used. With an older PC or laptop, one could simply connect the microcontroller to the serial port via a suitable level shifter. Modern PCs, and especially laptops, do not have a serial port, however. The usual solution is to use a USB port on the PC to connect to a USB-to-serial adaptor. The microcontroller still requires a level shifter to connect to the RS-232 port on the adaptor, because the adaptor itself also contains a level shifter. So we have this chain of connections: PC -- USB chip -- level shifter -- RS-232 -- level shifter -- microcontroller. Surely we can cut out the pair of level shifters and connect directly from the USB chip to the microcontroller?
This is exactly what some microcontroller boards do, notably the Arduino. They contain a built-in USB chip that appears, to the host side, as a serial port. The chip then connects directly, at TTL levels, to the microcontroller's UART. But what about microcontroller boards that do not contain a USB interface chip? Can we make something similar ourselves?
We can indeed make a USB serial to TTL-level microcontroller interface cable, by taking advantage of the commonly-available mobile phone interface cables. These cables connect a host computer's USB port to the phone via a serial connection, just as we want to do with a microcontroller (after all, the phone contains a microcontroller of some sort). We must cut off the plug on the phone end of the cable and replace it with a small circuit of our own.
The two most useful mobile phone cables for this purpose are the CA-42 and the DKU-5.
To Be Continued....
Return to the Creative Technology page
Return to John Honniball's home page
Copyright © 2010-2011 by John Honniball. All rights reserved.